Notify of Pending PRs #279
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 'Notify of Pending PRs' | |
| on: | |
| schedule: | |
| - cron: '30 1 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| stale: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Generate Pending PRs list | |
| id: generate-prs | |
| run: | | |
| ./.github/workflows/scripts/pending-prs slack redpanda-data/redpanda-operator > payload.json | |
| echo "has-prs=$(wc -l < payload.json | xargs)" >> "$GITHUB_OUTPUT" | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| - name: Post message to Slack channel | |
| uses: slackapi/[email protected] | |
| if: steps.generate-prs.outputs.has-prs != '0' | |
| with: | |
| webhook: ${{ secrets.SLACK_WEBHOOK_URL }} | |
| webhook-type: webhook-trigger | |
| payload-file-path: "./payload.json" |