Skip to content

Commit

Permalink
feat: skip if no configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
peaceiris committed Mar 20, 2020
1 parent e35bd86 commit 97e830a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,16 @@ export async function run(): Promise<void> {
if (eventName === 'issues') {
eventType = 'issue';
if (config.labels[labelIndex][`${labelEvent}`].issue === void 0) {
eventType = 'pr';
core.info(
`[INFO] no configuration labels.${labelName}.${labelEvent}.${eventType}`
);
}
} else if (eventName === 'pull_request') {
eventType = 'pr';
if (config.labels[labelIndex][`${labelEvent}`].pr === void 0) {
eventType = 'issue';
core.info(
`[INFO] no configuration labels.${labelName}.${labelEvent}.${eventType}`
);
}
}

Expand Down

0 comments on commit 97e830a

Please sign in to comment.