Skip to content

Commit e037d53

Browse files
datapythonistaMateusz Górski
authored and
Mateusz Górski
committed
CI: Adding GitHub action to assign issues based on comment (pandas-dev#29648)
1 parent 88e5f51 commit e037d53

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

.github/workflows/assign.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Assign
2+
on:
3+
issue_comment:
4+
types: created
5+
6+
jobs:
7+
one:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name:
11+
run: |
12+
if [[ "${{ github.event.comment.body }}" == "take" ]]; then
13+
echo "Assigning issue ${{ github.event.issue.number }} to ${{ github.event.comment.user.login }}"
14+
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -d '{"assignees": ["${{ github.event.comment.user.login }}"]}' https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/assignees
15+
fi

doc/source/development/contributing.rst

+21
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,27 @@ and `good first issue
2424
where you could start out. Once you've found an interesting issue, you can
2525
return here to get your development environment setup.
2626

27+
When you start working on an issue, it's a good idea to assign the issue to yourself,
28+
so nobody else duplicates the work on it. GitHub restricts assigning issues to maintainers
29+
of the project only. In most projects, and until recently in pandas, contributors added a
30+
comment letting others know they are working on an issue. While this is ok, you need to
31+
check each issue individually, and it's not possible to find the unassigned ones.
32+
33+
For this reason, we implemented a workaround consisting of adding a comment with the exact
34+
text `take`. When you do it, a GitHub action will automatically assign you the issue
35+
(this will take seconds, and may require refreshint the page to see it).
36+
By doing this, it's possible to filter the list of issues and find only the unassigned ones.
37+
38+
So, a good way to find an issue to start contributing to pandas is to check the list of
39+
`unassigned good first issues <https://github.com/pandas-dev/pandas/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22+no%3Aassignee>`_
40+
and assign yourself one you like by writing a comment with the exact text `take`.
41+
42+
If for whatever reason you are not able to continue working with the issue, please try to
43+
unassign it, so other people know it's available again. You can check the list of
44+
assigned issues, since people may not be working in them anymore. If you want to work on one
45+
that is assigned, feel free to kindly ask the current assignee if you can take it
46+
(please allow at least a week of inactivity before considering work in the issue discontinued).
47+
2748
Feel free to ask questions on the `mailing list
2849
<https://groups.google.com/forum/?fromgroups#!forum/pydata>`_ or on `Gitter`_.
2950

0 commit comments

Comments
 (0)