From 94ed5f873021df7f07883cdd350514459b1de0ac Mon Sep 17 00:00:00 2001 From: John Mertic Date: Sat, 24 Oct 2020 09:05:38 -0400 Subject: [PATCH] Add catch for error on adding to project it's already associated with. Signed-off-by: John Mertic --- main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.go b/main.go index 3eced28..a7ee086 100644 --- a/main.go +++ b/main.go @@ -238,6 +238,11 @@ func addToProject(ctx context.Context, client *github.Client, eventID, columnID err = validateGitHubResponse(res, err) if err != nil { + // Catch error if the issue is already on that + if err.Message == "Project already has the associated issue" { + infoLog("Project already has the associated issue...skipping") + return nil + } return err }