Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/foc-wg-pr-notifier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: FOC-WG PR Notifier

on:
schedule:
# Run at 9 AM EST (14:00 UTC) on weekdays
- cron: '0 14 * * 1-5'
workflow_dispatch:
# Allow manual trigger for testing
inputs:
dry_run:
description: 'Dry run (show message without posting to Slack)'
required: false
default: 'false'
type: choice
options:
- 'false'
- 'true'

jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install dependencies
run: pip install -r requirements.txt

- name: Run PR Notifier
run: |
if [ "${{ github.event.inputs.dry_run }}" = "true" ]; then
python foc_wg_pr_notifier.py --dry-run
else
python foc_wg_pr_notifier.py
fi
env:
# GitHub PAT with `read:project` organization permission
# Set up by @rjan90 on 2026-01-12 using FilOzzy PAT
GITHUB_TOKEN: ${{ secrets.FOC_WG_NOTIFIER_PAT }}
# Slack incoming webhook URL for #foc-wg channel
# Set up by @rjan90 on 2026-01-06 using "FOC-WG PR Notifier" Slack app
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,41 @@ Complete workflow for finding relevant Filecoin Slack messages related to specif

This is particularly useful for investigating storage provider issues and tracking community discussions.

### 📢 FOC-WG PR Notifier
**File:** `foc_wg_pr_notifier.py`

Automated daily notification system that fetches open PRs from [FilOzone GitHub Project 14 (View 32)](https://github.com/orgs/FilOzone/projects/14/views/32) and posts a formatted summary to the `#foc-wg` Slack channel.

**Features:**
- Queries GitHub Project 14 via GraphQL API
- Applies View 32 filters (excludes "Done" status, specific milestones)
- Groups PRs by repository
- Posts formatted Slack messages with PR details
- Runs automatically via GitHub Actions (see [./github/workflows/fog-wg-pr-notifier.yml](fog-wg-pr-notifier.yml))

**Testing:**

1. **Local dry-run test** (recommended first step):
```bash
GITHUB_TOKEN=your_token python foc_wg_pr_notifier.py --dry-run
```
This will fetch PRs and show the message that would be posted without actually sending to Slack.

2. **Local full test** (posts to Slack):
```bash
GITHUB_TOKEN=your_token SLACK_WEBHOOK_URL=your_webhook python foc_wg_pr_notifier.py
```

3. **GitHub Actions test**:
- Go to the [Actions tab](https://github.com/FilOzone/tpm-utils/actions) in the repository
- Select "FOC-WG PR Notifier" workflow
- Click "Run workflow"
- Choose "true" for dry_run to test without posting, or "false" to post to Slack
- Click "Run workflow" button

***Periodic Runs:***
This notifier is scheduled to run periodically per [./github/workflows/fog-wg-pr-notifier.yml](fog-wg-pr-notifier.yml).

## Getting Started

1. **Clone the repository**
Expand Down
Loading