Skip to content

Commit

Permalink
build: improve readability of texts in workflows
Browse files Browse the repository at this point in the history
PR-URL: #40988
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
Mesteery authored and targos committed Jan 14, 2022
1 parent edefb41 commit 011c5f6
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 6 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/authors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GH_USER_TOKEN }}
with:
author: Node.js GitHub Bot <[email protected]>
body: "Here are some new additions to the AUTHORS file. This is an automatically generated PR by the `authors.yml` GitHub Action, which runs `tools/update-authors.js`."
body: >
Here are some new additions to the AUTHORS file.
This is an automatically generated PR by the
`authors.yml` GitHub Action, which runs `tools/update-authors.js`.
branch: "actions/authors-update" # Custom branch *just* for this Action.
commit-message: "meta: update AUTHORS"
labels: meta
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/close-stalled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ on:
schedule:
- cron: "0 0 * * *"

env:
CLOSE_MESSAGE: >
Closing this because it has stalled. Feel free to reopen if this issue/PR
is still relevant, or to ping the collaborator who labelled it stalled if
you have any questions.
jobs:
stale:
if: github.repository == 'nodejs/node'
Expand All @@ -14,8 +20,8 @@ jobs:
days-before-close: 30
stale-pr-label: stalled
stale-issue-label: stalled
close-issue-message: Closing this because it has stalled. Feel free to reopen if this issue is still relevant, or to ping the collaborator who labelled it stalled if you have any questions.
close-pr-message: Closing this because it has stalled. Feel free to reopen if this PR is still relevant, or to ping the collaborator who labelled it stalled if you have any questions.
close-issue-message: ${{ env.CLOSE_MESSAGE }}
close-pr-message: ${{ env.CLOSE_MESSAGE }}
# used to filter issues to check whether or not should be closed, avoids hitting maximum operations allowed if needing to paginate through all open issues
only-labels: stalled
# max requests it will send per run to the GitHub API before it deliberately exits to avoid hitting API rate limits
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/comment-labeled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ on:
pull_request_target:
types: [labeled]

env:
STALE_MESSAGE: >
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.
FAST_TRACK_MESSAGE: Fast-track has been requested by @${{ github.actor }}. Please 👍 to approve.

jobs:
staleComment:
if: github.repository == 'nodejs/node' && github.event.label.name == 'stalled'
Expand All @@ -14,7 +20,7 @@ jobs:
env:
NUMBER: ${{ github.event.issue.number || github.event.pull_request.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh issue comment "$NUMBER" --repo ${{ github.repository }} --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."
run: gh issue comment "$NUMBER" --repo ${{ github.repository }} --body "$STALE_MESSAGE"

fastTrack:
if: github.repository == 'nodejs/node' && github.event_name == 'pull_request_target' && github.event.label.name == 'fast-track'
Expand All @@ -23,4 +29,4 @@ jobs:
- 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."
run: gh pr comment ${{ github.event.pull_request.number }} --repo ${{ github.repository }} --body "$FAST_TRACK_MESSAGE"
5 changes: 4 additions & 1 deletion .github/workflows/license-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ jobs:
author: Node.js GitHub Bot <[email protected]>
branch: actions/license-builder
title: "doc: run license-builder"
body: "License is likely out of date. This is an automatically generated PR by the `license-builder.yml` GitHub Action, which runs `license-builder.sh` and submits a new PR or updates an existing PR."
body: >
License is likely out of date. This is an automatically generated PR by
the `license-builder.yml` GitHub Action, which runs `license-builder.sh`
and submits a new PR or updates an existing PR.
commit-message: 'doc: run license-builder'
labels: meta

0 comments on commit 011c5f6

Please sign in to comment.