You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+64-22Lines changed: 64 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,23 +1,27 @@
1
1
## Handle Multiple Issues
2
2
3
-
> ℹ️ This GitHub workflow is designed for open source projects where users are allowed to create only one issue at a time.
3
+
> ℹ️ This GitHub workflow is designed for open source projects where users are allowed to work on only one issue at a time.
4
4
5
5
With this GitHub workflow, you can automate tasks whenever an author creates multiple open issues.
6
6
7
7
### Use cases
8
8
9
9
- The workflow can comment the issues that are already created by the author which are currently in the open state.
10
+
- You can also filter the issues that are assigned to you
10
11
- You can add your own comment message (even multiline) in the issue.
11
-
-Add a custom label on the issue.
12
+
-You can add label or labels based on your preferences.
12
13
- Optionally, you can also close the issue (previous issues won't be affected), and only the current issue will be closed.
13
14
14
15
---
15
16
16
17
### 🚀 Getting Started
17
18
18
19
- For custom configuration in-depth, you can check [examples](#examples).
20
+
- Create a file in the repository at the following path: `.github/workflows/handle-multiple-issues.yml` and paste the following code into it.
19
21
20
22
```yml
23
+
name: Handle Multiple Issues
24
+
21
25
on:
22
26
issues:
23
27
types:
@@ -32,8 +36,7 @@ jobs:
32
36
with:
33
37
label: "multiple issues"#default
34
38
close: false #default
35
-
issueNumber: true #default is false
36
-
gh-token: ${{ secrets.GITHUB_TOKEN }} # this is mandatory
39
+
issueNumber: true #default is true
37
40
```
38
41
39
42
---
@@ -44,26 +47,30 @@ Various inputs are defined to let you configure the action:
44
47
45
48
| Name | Description | Default |
46
49
| ---- | ----------- | ------- |
47
-
| `gh-token` | The GitHub token for authentication | N/A |
48
-
| `label` | A label to add if the conditions are fulfilled | `'multiple issues'` |
50
+
| `gh-token` | The GitHub token for authentication | `'${{ github.token }}'` |
51
+
| `label` | Add a label to the current issue. Use commas to separate if there are multiple labels. | `'multiple issues'` |
49
52
| `comment` | A message to comment on the issue | `''` |
50
53
| `close` | This will close the issue if set to true | `'false'` |
51
-
| `issueNumber` | This will comment all the previous issues that are created by the author | `'potential-duplicate'` |
54
+
| `issueNumber` | This will comment all the previous issues that are created by the author | `'true'` |
55
+
| `assign` | This will filter the issues that are assigned to the author (works only if `issueNumber` is `true`) | `'false'` |
52
56
53
57
<br>
54
58
55
-
The four Combinations that you can use with commentand issueNumber:
59
+
The Combinations that you can use with `comment`, `assign` and `issueNumber`:
56
60
57
-
> Suppose, a user has created `#1`, `#2` which are currently open and we have now included this workflow. Now suppose he creates the `#3` issue.
61
+
> Suppose, a user has created `#1`, `#2` which are currently open, only `#2` is assigned to author and we have now included this workflow. Now suppose he creates the `#3` issue.
58
62
59
63
> You can see the [examples](#examples) for better clarity.
| `false` | | `false` | Nothing is mentioned; only the label is added as per the workflow | |
71
+
| `true` | | `true` | To filter issues that are created by the author and assigned to the same author | `#2 has been opened by you and is also assigned to you.` |
72
+
73
+
> Only the default message is modified when `assign` is set to `true`; the concept of a custom message remains unchanged.
0 commit comments