Skip to content

Commit

Permalink
Merge pull request #3 from alexh97/pr-test
Browse files Browse the repository at this point in the history
Update README with new syntax
  • Loading branch information
alexh97 committed Mar 15, 2020
2 parents 218051e + 0365c21 commit 515eb98
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions project-assigner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ You can provide multiple label to project mappings as the action input.
## Inputs

### `issue-mappings`
A JSON array of objects containing `label`, `projectName`, and `columnId` attributes.
A JSON array of objects containing `label`, `projectNumber`, and `columnName` attributes.

**`label`** - name of the GitHub label that should trigger this action when it's applied to or removed from an issue or a pull request.

**`projectName`** - name of the project that an issue or pull request should be assinged to when the label is applied, or removed from when the label is removed.
**`projectNumber`** - number of the project that an issue or pull request should be assinged to when the label is applied, or removed from when the label is removed.

**`columnId`** - *ID* of the GitHub project column that an issue or a pull request should be placed in when they're assigned to the project. For issues, this would typically be the ID of the "To Do" column. For pull requests, this may be the ID of the "In Review" column. You should use your own discression when choosing which columns to use for your particular project. A column ID can be found by copying the column URL using its "..." menu and then using the numeric ID at the end of the URL as the value for `columnId`.
**`columnName`** - Name of the GitHub project column that an issue or a pull request should be placed in when they're assigned to the project. For issues, this would typically be the "To Do" column. For pull requests, this may be the "In Review" column. You should use your own discression when choosing which columns to use for your particular project.

Here's a sample format of the `issue-mappings` input:

issue-mappings: '[{"label": "Test", "projectName": "test", "columnId": 1234},
{"label": "bug", "projectName": "test2", "columnId": 5678}]'
issue-mappings: '[{"label": "Test", "projectNumber": 1, "columnName": "To do"},
{"label": "bug", "projectNumber": 2, "columnName": "In progress"}]'

## Example usage

Expand All @@ -41,8 +41,8 @@ In order to use this action, create a workflow configuration file (e.g. `issues-
uses: alexh97/github-actions/[email protected]
id: project_assigner
with:
issue-mappings: '[{"label": "Test", "projectName": "test", "columnId": 1234},
{"label": "bug", "projectName": "test2", "columnId": 5678}]'
issue-mappings: '[{"label": "Test", "projectNumber": 1, "columnName": "To do"},
{"label": "bug", "projectNumber": 2, "columnName": "In progress"}]'
ghToken: ${{ secrets.GITHUB_TOKEN }}

### A workflow configuration for assigning pull requests to projects
Expand All @@ -60,6 +60,6 @@ In order to use this action, create a workflow configuration file (e.g. `issues-
uses: alexh97/github-actions/[email protected]
id: project_assigner
with:
issue-mappings: '[{"label": "Test", "projectName": "test", "columnId": 1234},
{"label": "enhancement", "projectName": "test2", "columnId": 5678}]'
issue-mappings: '[{"label": "Test", "projectNumber": 1, "columnName": "In review"},
{"label": "enhancement", "projectNumber": 2, "columnName": "To do"}]'
ghToken: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 515eb98

Please sign in to comment.