diff options
author | James M Snell <jasnell@gmail.com> | 2021-04-28 03:47:30 +0300 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2021-06-11 10:30:10 +0300 |
commit | fcc6a00f1a31b5d5f0fd0d11e73b3f15b95a67ee (patch) | |
tree | f64ce6ea9c0e21a48c963b01c5c056c4fd86e79e /.github | |
parent | b8c4d30e77ebabf0bd804c4412f876a350fbaa69 (diff) |
meta: post comment when pr labeled fast-track
Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/38446
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Mary Marchini <oss@mmarchini.me>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/comment-labeled.yml | 29 | ||||
-rw-r--r-- | .github/workflows/comment-stalled.yml | 21 |
2 files changed, 29 insertions, 21 deletions
diff --git a/.github/workflows/comment-labeled.yml b/.github/workflows/comment-labeled.yml new file mode 100644 index 00000000000..14e48ea8dd3 --- /dev/null +++ b/.github/workflows/comment-labeled.yml @@ -0,0 +1,29 @@ +name: Comment on issues and PRs when labelled +on: + issues: + types: [labeled] + pull_request_target: + types: [labeled] + +jobs: + staleComment: + if: github.repository == 'nodejs/node' && github.event.label.name == 'stalled' + runs-on: ubuntu-latest + steps: + - name: Post stalled comment + env: + COMMENTS_URL: ${{ github.event.issue.comments_url || github.event.pull_request.comments_url }} + run: | + curl -X POST $COMMENTS_URL \ + -H "Content-Type: application/json" \ + -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ + --data '{ "body": "This issue/PR was marked as stalled, it will be automatically closed in 30 days. If it should remain open, please leave a comment explaining why it should remain open." }' + + fastTrack: + if: github.repository == 'nodejs/node' && github.event_name == 'pull_request_target' && github.event.label.name == 'fast-track' + runs-on: ubuntu-latest + steps: + - name: Request Fast-Track + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: gh pr comment ${{ github.event.pull_request.number }} --repo ${{ github.repository }} --body "Fast-track has been requested by @${{ github.actor }}. Please 👍 to approve." diff --git a/.github/workflows/comment-stalled.yml b/.github/workflows/comment-stalled.yml deleted file mode 100644 index 1c21505c4ad..00000000000 --- a/.github/workflows/comment-stalled.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Comment on issues and PRs when labelled stalled -on: - issues: - types: [labeled] - pull_request_target: - types: [labeled] - -jobs: - staleComment: - if: github.repository == 'nodejs/node' - runs-on: ubuntu-latest - steps: - - name: Post comment - if: github.event.label.name == 'stalled' - env: - COMMENTS_URL: ${{ github.event.issue.comments_url || github.event.pull_request.comments_url }} - run: | - curl -X POST $COMMENTS_URL \ - -H "Content-Type: application/json" \ - -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ - --data '{ "body": "This issue/PR was marked as stalled, it will be automatically closed in 30 days. If it should remain open, please leave a comment explaining why it should remain open." }' |