From 2d3302ffa0a5028c0aeb9a383d9f344518be51cf Mon Sep 17 00:00:00 2001 From: bretg Date: Wed, 11 Dec 2024 09:06:58 -0500 Subject: [PATCH 1/2] Adding stale PR workflow This has been tested over in the sourcecred repo. The goal is to slack a summary of stale PRs to the #prebid-server-dev channel once/week. --- .github/workflows/slack_stale_pr.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/slack_stale_pr.yml diff --git a/.github/workflows/slack_stale_pr.yml b/.github/workflows/slack_stale_pr.yml new file mode 100644 index 00000000000..54b75dbb95b --- /dev/null +++ b/.github/workflows/slack_stale_pr.yml @@ -0,0 +1,27 @@ +name: Find stale PRs + +on: + # run Monday 9am and on-demand + workflow_dispatch: + schedule: + - cron: '0 9 * * 1' + +jobs: + fetch-PRs: + runs-on: ubuntu-latest + steps: + - name: Fetch pull requests + id: local + uses: paritytech/stale-pr-finder@v0.3.0 + with: + GITHUB_TOKEN: ${{ github.token }} + days-stale: 14 + ignoredLabels: "blocked" + - name: Post to a Slack channel + id: slack + uses: slackapi/slack-github-action@v1.27.1 + with: + channel-id: ${{ secrets.SLACK_CHANNEL_ID }} + slack-message: "${{ steps.local.outputs.message }}" + env: + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} From 5b806e0a1df0aa6f7a6f54809d99647a0b55e770 Mon Sep 17 00:00:00 2001 From: bretg Date: Fri, 13 Dec 2024 11:39:10 -0500 Subject: [PATCH 2/2] review updates --- .github/workflows/{slack_stale_pr.yml => slack-stale-pr.yml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{slack_stale_pr.yml => slack-stale-pr.yml} (95%) diff --git a/.github/workflows/slack_stale_pr.yml b/.github/workflows/slack-stale-pr.yml similarity index 95% rename from .github/workflows/slack_stale_pr.yml rename to .github/workflows/slack-stale-pr.yml index 54b75dbb95b..a610c3e7de9 100644 --- a/.github/workflows/slack_stale_pr.yml +++ b/.github/workflows/slack-stale-pr.yml @@ -1,4 +1,4 @@ -name: Find stale PRs +name: Post Stale PRs To Slack on: # run Monday 9am and on-demand