Skip to content

Commit 8c9bd73

Browse files
authored
repo sync
2 parents 5817732 + 9b3eb7d commit 8c9bd73

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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+
}

0 commit comments

Comments
 (0)