Skip to content

Commit ffa0bb6

Browse files
NateIsernclaude
andcommitted
Add new issues to the Oxy Roadmap automatically
The roadmap at https://github.com/orgs/OxyHQ/projects/14 spans both organisations. GitHub refuses to link a repository to a project owned by a different organisation, so this workflow is the ONLY route by which a FairCoin issue can reach it automatically. Inert and green until ADD_TO_PROJECT_TOKEN exists. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 0d13bd5 commit ffa0bb6

1 file changed

Lines changed: 52 additions & 0 deletions

File tree

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Put every new issue on the Oxy Roadmap.
2+
#
3+
# https://github.com/orgs/OxyHQ/projects/14 spans BOTH organisations. GitHub
4+
# refuses to LINK a repository to a project owned by a different organisation
5+
# ("Only projects owned by the same owner as the repository can be linked"),
6+
# which is why the project's own built-in auto-add cannot be used for the
7+
# FairCoin repositories. Adding an ITEM across organisations is allowed, and
8+
# that is exactly what this action does, so one workflow covers both.
9+
#
10+
# Inert until ADD_TO_PROJECT_TOKEN exists. It must be a CLASSIC token with the
11+
# `project` scope: a fine-grained token is scoped to a single owner and cannot
12+
# reach both organisations. `public_repo` alone is not enough, Projects v2 is a
13+
# separate scope.
14+
#
15+
# The action is pinned to a commit rather than a tag: a tag can be moved to
16+
# point at different code, and this workflow holds a token that can write to
17+
# every project in the organisation.
18+
19+
name: Add to roadmap
20+
21+
on:
22+
issues:
23+
types: [opened, reopened, transferred]
24+
25+
permissions: {}
26+
27+
concurrency:
28+
group: add-to-roadmap-${{ github.event.issue.number }}
29+
cancel-in-progress: false
30+
31+
jobs:
32+
add:
33+
runs-on: ubuntu-latest
34+
steps:
35+
- name: Check whether the token is configured
36+
id: gate
37+
env:
38+
TOKEN: ${{ secrets.ADD_TO_PROJECT_TOKEN }}
39+
run: |
40+
if [ -n "$TOKEN" ]; then
41+
echo "ready=true" >> "$GITHUB_OUTPUT"
42+
else
43+
echo "::notice::ADD_TO_PROJECT_TOKEN is not set, so this issue was not added to the roadmap."
44+
echo "ready=false" >> "$GITHUB_OUTPUT"
45+
fi
46+
47+
- name: Add the issue to the roadmap
48+
if: steps.gate.outputs.ready == 'true'
49+
uses: actions/add-to-project@5afcf98fcd03f1c2f92c3c83f58ae24323cc57fd # v2.0.0
50+
with:
51+
project-url: https://github.com/orgs/OxyHQ/projects/14
52+
github-token: ${{ secrets.ADD_TO_PROJECT_TOKEN }}

0 commit comments

Comments
 (0)