Skip to content

Commit 423720b

Browse files
Merge pull request #650 from UnlockedLabs/chrissantillan-patch-1
feat: add workflow to label issues with "Needs verification" when moved to Done
2 parents 9113999 + c2c7aa4 commit 423720b

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Add Needs Verification Label
2+
3+
on:
4+
project_card:
5+
types: [moved]
6+
7+
jobs:
8+
add-label:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Check if the issue is moved to Done
12+
id: check_move
13+
run: |
14+
if [[ "${{ github.event.project_card.column_id }}" != "98236657" ]]; then
15+
echo "Not moved to Done column. Exiting."
16+
exit 0
17+
fi
18+
19+
- name: Add Needs Verification Label
20+
if: steps.check_move.outputs.result == 'true'
21+
uses: actions/github-script@v6
22+
with:
23+
script: |
24+
const issue_number = context.payload.project_card.content_url.split('/').pop();
25+
await github.issues.addLabels({
26+
owner: context.repo.owner,
27+
repo: context.repo.repo,
28+
issue_number: issue_number,
29+
labels: ['Needs verification']
30+
});

0 commit comments

Comments
 (0)