feat: notify issues weekly #5
Workflow file for this run
This file contains 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: Weekly GitHub Issue Notifier | |
on: | |
schedule: | |
- cron: '0 2 * * 1' # Run every Monday at 2:00 AM UTC | |
pull_request: # Trigger workflow on pull request events | |
branches: | |
- main # Specify the target branch for the pull request, e.g., main | |
jobs: | |
notify: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 8.6.0 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'pnpm' | |
- run: pnpm install | |
- name: Run the notifier script | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # GitHub token for API access | |
SLACK_ISSUE_NOTIFY_WEBHOOK_URL: ${{ secrets.SLACK_ISSUE_NOTIFY_WEBHOOK_URL }} # Slack webhook URL | |
DEVELOPER_MANAGER_SLACK_ID: ${{ secrets.DEVELOPER_MANAGER_SLACK_ID }} # Slack ID of the manager | |
GITHUBID_SLACKID_MAPPING: ${{ secrets.GITHUBID_SLACKID_MAPPING }} # JSON string mapping GitHub to Slack usernames | |
run: node .github/scripts/issue-notification.js | |