From 633f1eabac04325a639d9f4893e8bb6fa89bb281 Mon Sep 17 00:00:00 2001 From: Daniel Watkins Date: Mon, 19 Aug 2019 18:52:41 +0000 Subject: Add GitHub pull request template to point people at hacking doc This will hopefully avoid people submitting PRs against our mirror repo. (Thanks to GitHub user @max06 for this suggestion!) --- .github/pull_request_template.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .github/pull_request_template.md (limited to '.github') diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000..170a71e5 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,9 @@ +***This GitHub repo is only a mirror. Do not submit pull requests +here!*** + +Thank you for taking the time to write and submit a change to +cloud-init! Please follow [our hacking +guide](https://cloudinit.readthedocs.io/en/latest/topics/hacking.html) +to submit your change to cloud-init's [Launchpad git +repository](https://code.launchpad.net/cloud-init/), where cloud-init +development happens. -- cgit v1.2.3 From e3b6d77880e8ab215bf4318894b3edd491308286 Mon Sep 17 00:00:00 2001 From: Ryan Harper Date: Thu, 7 Nov 2019 00:21:33 +0000 Subject: github: drop pull-request template to prepare for migration --- .github/pull_request_template.md | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 .github/pull_request_template.md (limited to '.github') diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md deleted file mode 100644 index 170a71e5..00000000 --- a/.github/pull_request_template.md +++ /dev/null @@ -1,9 +0,0 @@ -***This GitHub repo is only a mirror. Do not submit pull requests -here!*** - -Thank you for taking the time to write and submit a change to -cloud-init! Please follow [our hacking -guide](https://cloudinit.readthedocs.io/en/latest/topics/hacking.html) -to submit your change to cloud-init's [Launchpad git -repository](https://code.launchpad.net/cloud-init/), where cloud-init -development happens. -- cgit v1.2.3 From 6e7f8590402967bffbdd0bb0ae241180910fcd2c Mon Sep 17 00:00:00 2001 From: Chad Smith Date: Thu, 9 Jan 2020 20:37:05 -0700 Subject: workflows: add contributor license agreement checker (#155) Check whether the pull request submitter has signed the CLA due to presence of github.actor in tools/.lp-to-git-user Set 'CLA signed' if present, 'CLA not signed' label if absent * grep for the full github username in CLA file Co-authored-by: Daniel Watkins --- .github/workflows/cla.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/cla.yml (limited to '.github') diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml new file mode 100644 index 00000000..34e11c2d --- /dev/null +++ b/.github/workflows/cla.yml @@ -0,0 +1,29 @@ +name: Verify Contributor License Agreement + +on: [pull_request] + +jobs: + cla-validate: + + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - run: | + echo "::set-env name=CLA_SIGNED::$(grep -q ': \"${{ github.actor }}\"' ./tools/.lp-to-git-user && echo CLA signed || echo CLA not signed)" + - name: Add CLA label + run: | + # POST a new label to this issue + curl --request POST \ + --url https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.number }}/labels \ + --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \ + --header 'content-type: application/json' \ + --data '{"labels": ["${{env.CLA_SIGNED}}"]}' + - name: Comment about CLA signing + if: env.CLA_SIGNED == 'CLA not signed' + run: | + # POST a comment directing submitter to sign the CLA + curl --request POST \ + --url https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.number }}/comments \ + --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \ + --header 'content-type: application/json' \ + --data '{"body": "Hello ${{ github.actor }},\n\nThank you for your contribution to cloud-init.\n\nIn order for us to merge this pull request, you need\nto have signed the Contributor License Agreement (CLA).\nPlease ensure that you have signed the CLA by following our\nhacking guide at:\n\nhttps://cloudinit.readthedocs.io/en/latest/topics/hacking.html\n\nThanks,\nYour friendly cloud-init upstream\n"}' -- cgit v1.2.3