Skip to content

Commit

Permalink
Stale Bot: notify in slack when new issues are flagged as Stale (#86309)
Browse files Browse the repository at this point in the history
* Remove Kitkat references

* Update wording of message we look for when issues get closed.

We do not use the term "kitkat" anymore.

* Stale Bot: post in Slack whenever new issues are flagged

This will allow the Dotcom Product Ambassadors Guild to keep an eye and triage old issues, and close them if necessary.

See p1704876305117489-slack-C0160HSMDQV
  • Loading branch information
jeherve authored Jan 16, 2024
1 parent 5295696 commit 25585e2
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/apply-stale-closure-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ jobs:
- name: Add [Closed] Stale label
id: add_closed_stale_label
uses: actions-ecosystem/action-add-labels@v1
if: contains( steps.get_last_comment.outputs.comment, 'Since this issue has been inactive for quite some time, KitKat has made the decision to close it.' )
if: contains( steps.get_last_comment.outputs.comment, 'Since this issue has been inactive for quite some time, it has now been closed.' )
with:
labels: "[Closed] Stale"
45 changes: 43 additions & 2 deletions .github/workflows/mark-issue-stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v8
- name: Mark issues and pull requests as stale
id: stale
uses: actions/stale@v8
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
# Message to be added to stale issues.
stale-issue-message: 'This issue is stale because 720 days have passed with no activity. A member of @kitkat-team will review and if required close this issue within 7 days. If you disagree and would like this issue to remain open, please provide additional context, updated reproduction steps and/or screenshots.'
stale-issue-message: 'This issue is stale because 720 days have passed with no activity. A member of the Dotcom Product Ambassadors Guild will review and if required close this issue within 7 days. If you disagree and would like this issue to remain open, please provide additional context, updated reproduction steps and/or screenshots.'
# Days before issue is considered stale.
days-before-issue-stale: 720
# Override stale setting for PRs.
Expand All @@ -34,3 +36,42 @@ jobs:
stale-pr-label: '[Status] Stale'
# Increase number of operations executed per run.
operations-per-run: 525
- name: Build Stale issues list
id: stale-build-list
uses: actions/github-script@v6
env:
ISSUES: ${{ steps.stale.outputs.staled-issues-prs }}
with:
script: |
const staleIssues = JSON.parse( process.env.ISSUES );
let staleIssuesList = '';
staleIssues.forEach(function(issue) {
if ( true === issue.markedStaleThisRun ) {
staleIssuesList += `\\n- ${issue.title} (https://github.com/automattic/wp-calypso/issues/${issue.number})`;
}
});
return staleIssuesList;
- name: Post about Stale issues on Slack
id: stale-post-slack
uses: slackapi/slack-github-action@v1.24.0
if: ${{ fromJSON( steps.stale-build-list.outputs.result ) != '' }}
with:
channel-id: ${{ secrets.SLACK_QUALITY_CHANNEL }}
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "The following issues have just been marked as stale. Please review them and take appropriate action:\n ${{ fromJSON( steps.stale-build-list.outputs.result ) }}"
}
}
],
"text": "The following issues have just been marked as stale. Please review them and take appropriate action.",
"unfurl_links": false,
"unfurl_media": false
}
env:
SLACK_QUALITY_CHANNEL: ${{ secrets.SLACK_QUALITY_CHANNEL }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_TOKEN }}
2 changes: 1 addition & 1 deletion test/e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,4 @@ Please refer to the [Writing Tests](docs/writing_tests.md) and [Style Guide](doc

## Troubleshooting

Please refer to the [Troubleshooting](docs/troubleshooting.md) page, or ask at [#kitkat](https://a8c.slack.com/archives/CQD1HH4MA).
Please refer to the [Troubleshooting](docs/troubleshooting.md) page.
2 changes: 0 additions & 2 deletions test/e2e/docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,5 +73,3 @@ At any point, run `arch` to verify whether shell is running with Rosetta 2 emula
## Apple Silicon (arm64)

Steps in the [Setup](../README.md#quick-start) should be enough to get the user up and running.

In case there is an unexpected issue, please reach out to @automattic/KitKat.

0 comments on commit 25585e2

Please sign in to comment.