Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

Community PR Lifecycle

Automates the lifecycle of community PRs after a team review, from "waiting on author" through to automatic closure.

Flow

Team reviews PR → leaves feedback → manually adds "waiting on author" label
        │
        ▼
[GitHub Action] Syncs Linear ticket → "Waiting on Author"
                Posts a comment on the PR with the timeline
        │
        │  (daily cron, no author activity for 14 days)
        ▼
[GitHub Action] Removes "waiting on author", adds "stale"
                Posts a stale warning comment
        │
        │  (daily cron, still no activity after 30 more days)
        ▼
[GitHub Action] Closes the PR
                Posts a closing comment
                Syncs Linear ticket → "Canceled"

Thresholds

Configurable via GitHub repository variables (Settings → Secrets and variables → Variables) without any code change. Falls back to the defaults below if not set.

Variable Default Meaning
WAITING_ON_AUTHOR_DAYS 14 Days before a "waiting on author" PR becomes stale
STALE_DAYS 30 Days before a stale PR is closed

Linear config

State IDs are stored in .github/scripts/.env (committed, not secrets — these are not sensitive):

Variable Linear state
LINEAR_CMS_STATUS_WAITING_ON_AUTHOR CMS team → "Waiting on Author"
LINEAR_CMS_STATUS_CANCELED CMS team → "Canceled"

Only CMS team tickets are synced. By the time "waiting on author" is added, the ticket has been picked up from the CPR team into CMS.

Required secrets

These already exist in the repo from the community PR triage workflow:

Secret Description
LINEAR_API_KEY Linear personal API key
LINEAR_CMS_TEAM_ID CMS team ID

Manual dry run

Trigger the workflow manually from the GitHub Actions tab. The dry_run input defaults to true — it logs which PRs would be promoted or closed without making any changes.