Skip to content

Commit

Permalink
Merge pull request #97 from KeisukeYamashita/test-complicated-cases
Browse files Browse the repository at this point in the history
Add complicated test case
  • Loading branch information
github-actions[bot] authored Jan 16, 2021
2 parents 6613b10 + 8e0de2f commit 93f2465
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
intervalSeconds: 1
timeoutSeconds: 60
labels: need,need2
labelsStrategy: atLeastOne
ignoreLabels: ignore
- name: Create Comment
uses: KeisukeYamashita/create-comment@v1
Expand Down
10 changes: 5 additions & 5 deletions 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.

10 changes: 5 additions & 5 deletions src/merger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class Merger {
}

core.debug(
`checked all labels for type:${type} and prLabels:${inspect(
`Checking all labels for type:${type} and prLabels:${inspect(
pr.labels.map(l => l.name)
)}, hasLabels:${inspect(hasLabels)}, labels:${inspect(
labels
Expand All @@ -75,7 +75,7 @@ export class Merger {
type === 'labels' ? '' : "does't"
} contains all ${inspect(labels)} for PR labels ${inspect(
pr.labels.map(l => l.name)
)}`
)} and and failed: ${failed}`
}
}

Expand All @@ -94,12 +94,12 @@ export class Merger {
if (type === 'labels' && hasLabels.length) {
failed = false
}
if (type === 'ignoreLabels' && hasLabels.length) {
if (type === 'ignoreLabels' && !hasLabels.length) {
failed = false
}

core.debug(
`checked all labels for type:${type} and prLabels:${inspect(
`Checking atLeastOne labels for type:${type} and prLabels:${inspect(
pr.labels.map(l => l.name)
)}, hasLabels:${inspect(hasLabels)}, labels:${inspect(
labels
Expand Down Expand Up @@ -160,7 +160,7 @@ export class Merger {
`Checked labels and passed with message:${labelResult.message} with ${this.cfg.labelsStrategy}`
)
core.info(
`Checked labels and passed with ignoreLabels:${inspect(
`Checked labels and passed with labels:${inspect(
this.cfg.labels
)}`
)
Expand Down

0 comments on commit 93f2465

Please sign in to comment.