File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -21,16 +21,15 @@ import (
2121func main () {
2222 payload := issueEventPayload ()
2323
24- // Get issue ID from payload to put it on designated GitHub project
25- issueID := IssueID (payload )
24+ issueID := extractIssueID (payload )
2625 infoLog ("New issue is found!!" )
2726 debugLog ("Issue ID: %d\n " , issueID )
2827
2928 client , ctx := getGitHubClient ()
3029
31- // Project type investigation
3230 url := os .Getenv ("GITHUB_PROJECT_URL" )
3331 if url == "" {
32+ log .Println ("[ERROR] Environment variable GITHUB_PROJECT_URL is not defined in your workflow file" )
3433 os .Exit (1 )
3534 }
3635
@@ -117,8 +116,8 @@ func issueEventPayload() github.IssuesEvent {
117116 return payload
118117}
119118
120- // IssueID returns GitHub issue ID to place onto the designated GitHub project
121- func IssueID (payload github.IssuesEvent ) int64 {
119+ // extractIssueID returns GitHub issue ID extracted from event payloads
120+ func extractIssueID (payload github.IssuesEvent ) int64 {
122121 return payload .GetIssue ().GetID ()
123122}
124123
You can’t perform that action at this time.
0 commit comments