File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed
Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Move Reopened Issues to Triage
2+
3+ # **What it does**: Moves issues that are reopened from the Done column to the Triage column.
4+ # **Why we have it**: To prevent having to do this manually.
5+ # **Who does it impact**: Open-source.
6+
7+ on :
8+ issues :
9+ types :
10+ - reopened
11+
12+ jobs :
13+ move-reopened-issue-to-triage :
14+ if : github.repository == 'github/docs'
15+ runs-on : ubuntu-latest
16+ steps :
17+ - uses : actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
18+ with :
19+ github-token : ${{ github.token }}
20+ script : |
21+ const issueNumber = context.issue.number;
22+ const doneColumnId = 11167427;
23+ const triageColumnId = 11007039;
24+
25+ try {
26+ const cards = await github.projects.listCards({
27+ column_id: doneColumnId
28+ });
29+
30+ for (const card of cards) {
31+ if (card.content_url.endsWith(`/${issueNumber}`)) {
32+ await github.projects.moveCard({
33+ card_id: card.id,
34+ position: 'position',
35+ column_id: triageColumnId
36+ });
37+ }
38+ }
39+ } catch(e) {
40+ console.log(error);
41+ }
You can’t perform that action at this time.
0 commit comments