Skip to content

Commit

Permalink
Merge pull request #3 from adamzolyak/patching
Browse files Browse the repository at this point in the history
Patching and Action YAML Updates
  • Loading branch information
adamzolyak authored Aug 27, 2019
2 parents d999b30 + 9345c15 commit c17fa85
Show file tree
Hide file tree
Showing 6 changed files with 1,098 additions and 1,093 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export GITHUB_TOKEN="12345"
export GITHUB_REPOSITORY="adamzolyak/actions-playground"
export GITHUB_EVENT_PATH="/issue-labeler-action/tests/fixtures/actionTrigger.json"

node index.js
node app.js
```

3. modify contents of [/tests/fixtures/actionTrigger.json](./tests/fixtures/actionTrigger.json) as needed for test data
Expand Down
31 changes: 17 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,22 @@ To use this GitHub Action, you must have access to [GitHub Actions](https://gith

To setup this action:

1. Create a `.github/main.workflow` in your GitHub repo.
2. Add the following code to the `main.workflow` file and commit it to the repo's `master` branch.

```
workflow "Bulk Issue Labeler" {
resolves = ["Bulk Label"]
on = "issues"
}
action "Bulk Label" {
uses = "adamzolyak/issue-labeler-action@master"
secrets = ["GITHUB_TOKEN"]
}
1. Create a `.github/worksflows/main.yml` in your GitHub repo ([more info](https://help.github.com/en/articles/configuring-a-workflow)).
2. Add the following code to the `main.yml` file and commit it to the repo's `master` branch.

```yaml
name: Bulk Issue Labeler

on: issues

jobs:
labelIssue:
name: Bulk Issue Labeler
runs-on: ubuntu-latest
steps:
- uses: adamzolyak/issue-labeler-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
3. Whenever you create an issue, the action will run!
Expand All @@ -43,4 +46,4 @@ If you have suggestions for how this GitHub Action could be improved, or want to
## License
[ISC](LICENSE) © 2018 Adam Zolyak <[email protected]> (www.tinkurlab.com)
[ISC](LICENSE) © 2019 Adam Zolyak <[email protected]> (www.tinkurlab.com)
2 changes: 1 addition & 1 deletion dev.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ export GITHUB_TOKEN="12345"
export GITHUB_REPOSITORY="adamzolyak/actions-playground"
export GITHUB_EVENT_PATH="/issue-labeler-action/tests/fixtures/actionTrigger.json"

node index.js
node app.js
2 changes: 1 addition & 1 deletion helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ module.exports.addLabel = function(
.addLabels({
owner: eventOwner,
repo: eventRepo,
number: eventIssueNumber,
issue_number: eventIssueNumber,
labels: [label] // ['Incomplete Tasks']
})
.then(({ data, headers, status }) => {
Expand Down
Loading

0 comments on commit c17fa85

Please sign in to comment.