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
Added support for labeling. The system can now evaluate the new issues based on the existence of labels, allowing us to combine unlabeled and labeled issue behavior.
This commit closes#45
Updated `README` to explain how to set up the labeling system and showing an example of how to combine different configurations in one file.
Extended unit tests to handle all predicted behaviors.
# The number of the project which the issues will be synced to
59
58
# You can find this in https://github.com/orgs/@ORGANIZATION/projects/<NUMBER>
60
59
project: 4
60
+
# Optional, the project field to modify with a new value
61
+
# Found more in https://docs.github.com/en/issues/planning-and-tracking-with-projects/understanding-fields/about-single-select-fields
62
+
project_field: Status
63
+
# Optional unless that project_field was set up. Then this field is required.
64
+
# The value to modify in the project field
65
+
project_value: To do
66
+
# Optional, labels to work with. Read below to see how to configure it.
67
+
# If this value is set, the action will be applied only to issues with such label(s).
68
+
labels: |
69
+
duplicate
70
+
bug
71
+
invalid
61
72
```
62
73
You can generate a new token [in your user's token dashboard](https://github.com/settings/tokens/new).
74
+
75
+
### Warning about labels field
76
+
The labels field accepts an array or a single value, [but only with some particular format](https://github.com/actions/toolkit/issues/184#issuecomment-1198653452), so it is important to follow it.
77
+
It accepts either:
78
+
```yml
79
+
labels: my label name
80
+
```
81
+
or an array of labels using a `pipe`:
82
+
```yml
83
+
labels: |
84
+
some label
85
+
another label
86
+
third label
87
+
```
88
+
It **does not** support the following type of arrays:
89
+
```yml
90
+
# not this one
91
+
labels:
92
+
- some label
93
+
- another one
94
+
95
+
# also doesn't support this one
96
+
labels: ["some label", "another one"]
97
+
```
98
+
63
99
### Using a GitHub app instead of a PAT
64
100
In some cases, specially in big organizations, it is more organized to use a GitHub app to authenticate, as it allows us to give it permissions per repository and we can fine-grain them even better. If you wish to do that, you need to create a GitHub app with the following permissions:
65
101
- Repository permissions:
@@ -88,6 +124,65 @@ Because this project is intended to be used with a token we need to do an extra
0 commit comments