Skip to content

Commit af20841

Browse files
committed
Add issue assignment workflows
1 parent 9349d0f commit af20841

File tree

2 files changed

+150
-0
lines changed

2 files changed

+150
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: On isuse comment
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
7+
jobs:
8+
assign:
9+
if: github.repository_owner == 'JabRef'
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
issues: write
14+
steps:
15+
- name: Assign the user or unassign stale assignments
16+
id: assign
17+
uses: takanome-dev/assign-issue-action@edge
18+
with:
19+
github_token: '${{ secrets.GITHUB_TOKEN }}'
20+
days_until_unassign: 14
21+
maintainers: 'koppor,Siedlerchr,ThiloteE,calixtus,HoussemNasri,subhramit,InAnYan,LinusDietz'
22+
assigned_comment: |
23+
👋 Hey @{{ handle }}, thank you for your interest in this issue! 🎉
24+
25+
We're excited to have you on board. Start by exploring our [Contributing](https://github.com/JabRef/jabref/blob/main/CONTRIBUTING.md) guidelines, and don't forget to check out our [workspace setup guidelines](https://devdocs.jabref.org/getting-into-the-code/guidelines-for-setting-up-a-local-workspace) to get started smoothly.
26+
27+
For questions on JabRef functionality and the code base, you can consult the [JabRef Guru](https://gurubase.io/g/jabref) or ask on our Gitter chat.
28+
29+
In case you encounter failing tests during development, please check our [developer FAQs](https://devdocs.jabref.org/code-howtos/faq.html)!
30+
31+
Having any questions or issues? Feel free to ask here on GitHub. Need help setting up your local workspace? Join the conversation on [JabRef's Gitter chat](https://gitter.im/JabRef/jabref). And don't hesitate to open a (draft) pull request early on to show the direction it is heading towards. This way, you will receive valuable feedback.
32+
33+
Happy coding! 🚀
34+
assignment_suggestion_comment: >
35+
👋 Hey @{{ handle }}, looks like you’re eager to work on this issue—great! 🎉
36+
It also looks like you skipped reading our [CONTRIBUTING.md](https://github.com/JabRef/jabref/blob/main/CONTRIBUTING.md), which explains exactly how to participate. No worries, it happens to the best of us.
37+
Give it a read, and you’ll discover the ancient wisdom of assigning issues to yourself. Trust me, it’s worth it. 🚀
38+
- name: Move issue corresponding column in "Candidates for University Projects"
39+
uses: m7kvqbe1/github-action-move-issues@main
40+
if: ${{ steps.assign.outputs.assigned == 'yes' || steps.assign.outputs.unassigned == 'yes' }}
41+
with:
42+
github-token: ${{ secrets.GH_TOKEN_ACTION_MOVE_ISSUE }}
43+
project-url: "https://github.com/orgs/JabRef/projects/3"
44+
target-labels: "📍 Assigned"
45+
target-column: "Assigned"
46+
ignored-columns: ""
47+
default-column: "Free to take"
48+
skip-if-not-in-project: true
49+
- name: Move issue corresponding column in "Good First Issues"
50+
uses: m7kvqbe1/github-action-move-issues@main
51+
if: ${{ steps.assign.outputs.assigned == 'yes' || steps.assign.outputs.unassigned == 'yes' }}
52+
with:
53+
github-token: ${{ secrets.GH_TOKEN_ACTION_MOVE_ISSUE }}
54+
project-url: "https://github.com/orgs/JabRef/projects/5"
55+
target-labels: "📍 Assigned"
56+
target-column: "Assigned"
57+
ignored-columns: ""
58+
default-column: "Free to take"
59+
skip-if-not-in-project: true
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: Unassign stale issue assignments
2+
3+
on:
4+
schedule:
5+
- cron: 4 12 * * *
6+
workflow_dispatch:
7+
8+
jobs:
9+
unassign_issues:
10+
if: github.repository_owner == 'JabRef'
11+
runs-on: ubuntu-latest
12+
permissions:
13+
issues: write
14+
outputs:
15+
unassigned_issues: ${{ steps.unassign.outputs.unassigned_issues || '[]' }}
16+
steps:
17+
- name: Unassign stale assignments
18+
id: unassign
19+
uses: takanome-dev/assign-issue-action@edge
20+
with:
21+
github_token: '${{ secrets.GITHUB_TOKEN }}'
22+
reminder_comment: |
23+
### ⏰ Assignment Reminder
24+
25+
Hi @{{ handle }}, this is a friendly reminder about your assignment to this issue.
26+
27+
> [!WARNING]
28+
> This issue will be **automatically unassigned** in **{{ days_remaining }} days** if there's no activity.
29+
30+
Remember that you can ask the [JabRef Guru](https://gurubase.io/g/jabref) or [DeepWiki](https://deepwiki.com/JabRef/jabref) about anything regarding JabRef.
31+
Additionally, our contributing guide has [hints on creating a pull request](https://github.com/JabRef/jabref/blob/main/CONTRIBUTING.md#pull-request-process) and a link to our Gitter chat.
32+
33+
<details open>
34+
<summary>How to keep your assignment</summary>
35+
36+
\
37+
If you are working on it, you can prevent automatic unassignment by:
38+
39+
- Submitting a [draft pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests#draft-pull-requests) with your progress within {{ days_remaining }} days
40+
- Asking for the **{{{ pin_label }}}** label if you need more time
41+
</details>
42+
43+
We appreciate your contribution and are here to help if needed!
44+
days_until_unassign: 21
45+
unassigned_comment: |
46+
### 📋 Assignment Update
47+
48+
Hi @{{ handle }}, due to inactivity, you have been unassigned from this issue.
49+
50+
<details>
51+
<summary>Next steps</summary>
52+
53+
\
54+
**If you still want to work on this:**
55+
- Submit a pull request showing your current state. You will be automatically assigned again.
56+
- Ask a maintainer to assign you again.
57+
</details>
58+
- name: Print unassigned issues
59+
run: >
60+
echo "Unassigned issues: ${{ steps.unassign.outputs.unassigned_issues }}"
61+
62+
move_unassigned_issues:
63+
needs: unassign_issues
64+
if: ${{ needs.unassign_issues.outputs.unassigned_issues != '[]' }}
65+
runs-on: ubuntu-latest
66+
strategy:
67+
matrix:
68+
issue_number: ${{ fromJson(needs.unassign_issues.outputs.unassigned_issues) }}
69+
steps:
70+
- name: Move issue to "Free to take" in "Good First Issues"
71+
uses: m7kvqbe1/github-action-move-issues/@main
72+
with:
73+
github-token: ${{ secrets.GH_TOKEN_ACTION_MOVE_ISSUE }}
74+
project-url: "https://github.com/orgs/JabRef/projects/5"
75+
target-labels: "📍 Assigned"
76+
target-column: "Free to take"
77+
ignored-columns: ""
78+
default-column: "Free to take"
79+
issue-number: ${{ matrix.issue_number }}
80+
skip-if-not-in-project: true
81+
- name: Move issue to "Free to take" in "Candidates for University Projects"
82+
uses: m7kvqbe1/github-action-move-issues/@main
83+
with:
84+
github-token: ${{ secrets.GH_TOKEN_ACTION_MOVE_ISSUE }}
85+
project-url: "https://github.com/orgs/JabRef/projects/3"
86+
target-labels: "📍 Assigned"
87+
target-column: "Free to take"
88+
ignored-columns: ""
89+
default-column: "Free to take"
90+
issue-number: ${{ matrix.issue_number }}
91+
skip-if-not-in-project: true

0 commit comments

Comments
 (0)