mirror of
https://github.com/actions/add-to-project.git
synced 2025-12-11 20:47:05 +00:00
Update documentation
This commit is contained in:
@@ -10,7 +10,7 @@ not the original GitHub Projects.
|
|||||||
|
|
||||||
To use the action, create a workflow that runs when issues are opened in your
|
To use the action, create a workflow that runs when issues are opened in your
|
||||||
repository. Run this action in a step, optionally configuring any filters you
|
repository. Run this action in a step, optionally configuring any filters you
|
||||||
may want to add, such as only adding issues with certain labels.
|
may want to add, such as only adding issues with certain labels. If you want to match all the labels, add `label-operator` input to be `AND`.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
name: Add bugs to bugs project
|
name: Add bugs to bugs project
|
||||||
@@ -32,7 +32,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
project-url: https://github.com/orgs/<orgName>/projects/<projectNumber>
|
project-url: https://github.com/orgs/<orgName>/projects/<projectNumber>
|
||||||
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
|
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
|
||||||
labeled: bug
|
labeled: bug, new
|
||||||
|
label-operator: AND
|
||||||
```
|
```
|
||||||
|
|
||||||
## Inputs
|
## Inputs
|
||||||
@@ -42,8 +43,9 @@ jobs:
|
|||||||
token](https://github.com/settings/tokens/new) with the `repo`, `write:org` and
|
token](https://github.com/settings/tokens/new) with the `repo`, `write:org` and
|
||||||
`read:org` scopes.
|
`read:org` scopes.
|
||||||
- `labeled` is a comma-separated list of labels. For an issue to be added to the
|
- `labeled` is a comma-separated list of labels. For an issue to be added to the
|
||||||
project, it must have _one_ of the labels in the list. Omitting this key means
|
project, it must have _one_ of the labels in the list if the `label-operator` doesn't exist or not `AND`. Omitting this key means
|
||||||
that all issues will be added.
|
that all issues will be added.
|
||||||
|
- `label-operator` is the behavior of the labels filter, either `AND` or `OR` that controls if the issue should be matched with `all` `labeled` input or any of them, default is `OR`.
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,9 @@ inputs:
|
|||||||
labeled:
|
labeled:
|
||||||
required: false
|
required: false
|
||||||
description: A comma-separated list of labels to use as a filter for issue to be added
|
description: A comma-separated list of labels to use as a filter for issue to be added
|
||||||
|
label-operator:
|
||||||
|
required: false
|
||||||
|
description: The behavior of the labels filter, AND to match all labels, OR to match any label (default is OR)
|
||||||
runs:
|
runs:
|
||||||
using: 'node16'
|
using: 'node16'
|
||||||
main: 'dist/index.js'
|
main: 'dist/index.js'
|
||||||
|
|||||||
Reference in New Issue
Block a user