summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorzsdc <taras@vyos.io>2020-09-15 17:05:20 +0300
committerzsdc <taras@vyos.io>2020-09-15 17:05:20 +0300
commit7cd260b313267dc7123cb99a75d4555e24909cca (patch)
treef57f3db085a724df237ffa64b589c6bb6dd3b28f /.github/workflows
parent1a790ee102fd405e5c3a20a17a69ba0c118ed874 (diff)
parent948bd9c1fcd08346cf8ec0551d7f6c2b234e896b (diff)
downloadvyos-cloud-init-7cd260b313267dc7123cb99a75d4555e24909cca.tar.gz
vyos-cloud-init-7cd260b313267dc7123cb99a75d4555e24909cca.zip
T2117: Cloud-init updated to 20.3
Merged with 20.3 tag from the upstream Cloud-init repository
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/cla.yml47
-rw-r--r--.github/workflows/stale.yml24
2 files changed, 53 insertions, 18 deletions
diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml
index 34e11c2d..8a0b2c07 100644
--- a/.github/workflows/cla.yml
+++ b/.github/workflows/cla.yml
@@ -8,22 +8,33 @@ jobs:
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
+ - name: Check CLA signing status for ${{ github.event.pull_request.user.login }}
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"}'
+ cat > unsigned-cla.txt <<EOF
+ Hello ${{ github.event.pull_request.user.login }},
+
+ Thank you for your contribution to cloud-init.
+
+ In order for us to merge this pull request, you need
+ to have signed the Contributor License Agreement (CLA).
+ Please sign the CLA by following our
+ hacking guide at:
+ https://cloudinit.readthedocs.io/en/latest/topics/hacking.html
+
+ Thanks,
+ Your friendly cloud-init upstream
+ EOF
+
+ has_signed() {
+ username="$1"
+ grep -q ": \"$username\"" ./tools/.lp-to-git-user && return 0
+ grep -q "^$username$" ./tools/.github-cla-signers && return 0
+ return 1
+ }
+
+ if has_signed "${{ github.event.pull_request.user.login }}"; then
+ echo "Thanks ${{ github.event.pull_request.user.login }} for signing cloud-init's CLA"
+ else
+ cat unsigned-cla.txt
+ exit 1
+ fi
diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml
new file mode 100644
index 00000000..20c5735d
--- /dev/null
+++ b/.github/workflows/stale.yml
@@ -0,0 +1,24 @@
+name: Mark and close stale pull requests
+
+on:
+ schedule:
+ - cron: "0 0 * * *" # Daily @ 00:00
+
+jobs:
+ stale:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/stale@v1
+ with:
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
+ days-before-stale: 14
+ days-before-close: 7
+ stale-pr-message: |
+ Hello! Thank you for this proposed change to cloud-init. This pull request is now marked as stale as it has not seen any activity in 14 days. If no activity occurs within the next 7 days, this pull request will automatically close.
+
+ If you are waiting for code review and you are seeing this message, apologies! Please reply, tagging mitechie, and he will ensure that someone takes a look soon.
+
+ (If the pull request is closed, please do feel free to reopen it if you wish to continue working on it.)
+ stale-pr-label: 'stale-pr'