Problem
Built-in "Auto-add to project" workflows are scoped to a single repository each, with a cap of 5 on Pro/Team
plans. There is no way to target multiple repos in one workflow.
Solution
Replace built-in workflows with actions/add-to-project, hosted as a
reusable workflow in the metreeca/.github repository.
Central workflow
Define .github/workflows/project-add.yml in metreeca/.github:
name: Add to project
on:
issues:
types: [opened]
pull_request:
types: [opened]
jobs:
add-to-project:
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@v1
with:
project-url: https://github.com/orgs/metreeca/projects/3
github-token: ${{ secrets.PROJECT_TOKEN }}
Per-repo caller
Each repo calls the central workflow with a one-liner:
name: Add to project
on:
issues: { types: [opened] }
pull_request: { types: [opened] }
jobs:
add:
uses: metreeca/.github/.github/workflows/project-add.yml@main
secrets: inherit
Alternatively, since metreeca/.github is public, org-wide workflow inheritance may apply without per-repo callers.
Token setup
- Create a fine-grained PAT with:
Organisation projects: read and write
Repository Issues: read
Pull requests: read
- Add it as an org secret named
PROJECT_TOKEN (Settings → Secrets → Actions)
Comparison
|
Built-in |
Actions-based |
| Repo limit |
5 (Pro/Team) |
Unlimited |
| Filter flexibility |
Limited |
Full event context, custom logic |
| Custom logic |
None |
Can set status, labels, custom fields |
| Audit trail |
None |
Full workflow run logs |
References
Problem
Built-in "Auto-add to project" workflows are scoped to a single repository each, with a cap of 5 on Pro/Team
plans. There is no way to target multiple repos in one workflow.
Solution
Replace built-in workflows with
actions/add-to-project, hosted as areusable workflow in the
metreeca/.githubrepository.Central workflow
Define
.github/workflows/project-add.ymlinmetreeca/.github:Per-repo caller
Each repo calls the central workflow with a one-liner:
Alternatively, since
metreeca/.githubis public, org-wide workflow inheritance may apply without per-repo callers.Token setup
Organisation projects: read and writeRepository Issues: readPull requests: readPROJECT_TOKEN(Settings → Secrets → Actions)Comparison
References
actions/add-to-project