66 - unassigned
77
88jobs :
9- ensure_column :
9+ columns_and_labels :
1010 if : ${{ github.repository_owner == 'JabRef' }}
1111 runs-on : ubuntu-latest
1212 permissions :
1313 issues : write
14+ contents : read
1415 steps :
16+ - name : Check assignees
17+ id : check_assignee
18+ run : |
19+ issue=$(gh issue view ${{ github.event.issue.number }} --json assignees)
20+ count=$(echo "$issue" | jq '.assignees | length')
21+ if [ "$count" -gt 0 ]; then
22+ echo "assigned=yes" >> $GITHUB_OUTPUT
23+ else
24+ echo "assigned=no" >> $GITHUB_OUTPUT
25+ fi
26+ env :
27+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
1528 - name : Move Issue to "Free to take" Column in "Candidates for University Projects"
29+ if : steps.check_assignee.outputs.assigned == 'no'
1630 uses : m7kvqbe1/github-action-move-issues@main
1731 with :
1832 github-token : ${{ secrets.GH_TOKEN_ACTION_MOVE_ISSUE }}
2337 default-column : " Free to take"
2438 skip-if-not-in-project : true
2539 - name : Move Issue to "Free to take" Column in "Good First Issues"
40+ if : steps.check_assignee.outputs.assigned == 'no'
2641 uses : m7kvqbe1/github-action-move-issues@main
2742 with :
2843 github-token : ${{ secrets.GH_TOKEN_ACTION_MOVE_ISSUE }}
@@ -32,19 +47,16 @@ jobs:
3247 ignored-columns : " "
3348 default-column : " Free to take"
3449 skip-if-not-in-project : true
35- remove_labels :
36- if : ${{ github.repository_owner == 'JabRef' }}
37- runs-on : ubuntu-latest
38- permissions :
39- issues : write
40- contents : read
41- steps :
4250 - uses : actions/checkout@v4
43- - name : Remove assigned label
44- run : gh issue edit ${{ github.event.issue.number }} --remove-label "📍 Assigned"
45- env :
46- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
47- - name : Remove FirstTimeCodeContribution label
48- run : gh issue edit ${{ github.event.issue.number }} --remove-label "FirstTimeCodeContribution"
51+ if : steps.check_assignee.outputs.assigned == 'no'
52+ - name : Remove labels assigned, reminder-sent, pinned, and "FirstTimeCodeContribution"
53+ if : steps.check_assignee.outputs.assigned == 'no'
54+ run : |
55+ set -e
56+
57+ gh issue edit ${{ github.event.issue.number }} --remove-label "📍 Assigned"
58+ gh issue edit ${{ github.event.issue.number }} --remove-label "🔔 reminder-sent"
59+ gh issue edit ${{ github.event.issue.number }} --remove-label "📌 Pinned"
60+ gh issue edit ${{ github.event.issue.number }} --remove-label "FirstTimeCodeContribution"
4961 env :
5062 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments