Skip to content

Commit c5fc162

Browse files
committed
Support all event actions in addition to "opened" action
GitHub Actions supports conditional statement in its yaml file and users can manage the target event actions with the statement. ``` if: github.event_name == 'issues' && github.event.action == 'closed' ```
1 parent 7e5d90f commit c5fc162

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

issues.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,6 @@ func issueEventPayload() github.IssuesEvent {
4444
if err != nil {
4545
errorLog(errors.Wrap(err, "Failed to unmarshal JSON to Go Object"))
4646
}
47-
if payload.GetAction() != "opened" {
48-
infoLog("GitHub action interupts!!")
49-
infoLog("This issue is not new one :D")
50-
os.Exit(0)
51-
}
5247

5348
return payload
5449
}

pull_requests.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,6 @@ func pullRequestEventPayload() github.PullRequestEvent {
4444
if err != nil {
4545
errorLog(errors.Wrap(err, "Failed to unmarshal JSON to Go Object"))
4646
}
47-
if payload.GetAction() != "opened" {
48-
infoLog("GitHub action interupts!!")
49-
infoLog("This PR is not new one :D")
50-
os.Exit(0)
51-
}
5247

5348
return payload
5449
}

0 commit comments

Comments
 (0)