Skip to content

Commit

Permalink
fix: comment removing labels (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
fuxingloh authored Jan 26, 2021
1 parent 07c6e4e commit f75fc85
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ the labels.

- Append based multi-labeler, using `.github/labeler.yml` as config.
- Automatically fail if `labeler.yml` is malformed, type-checked.
- Set label to sync for conditional labeling, removed if condition failed.
- Regex Matcher:
- PR/Issue title
- PR/Issue body
Expand Down
3 changes: 2 additions & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ async function removeLabels(
labels: string[],
config: Config
): Promise<unknown[]> {
if (!(github.context.payload.pull_request || github.context.payload.issue)) {
const eventName = github.context.eventName
if (!['pull_request', 'issue'].includes(eventName)) {
return []
}

Expand Down

0 comments on commit f75fc85

Please sign in to comment.