Skip to content

Commit

Permalink
Update main.go
Browse files Browse the repository at this point in the history
  • Loading branch information
sedefsavas committed May 11, 2022
1 parent 079c75c commit 51ee841
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ci/ami/github-action/main.go
Expand Up @@ -106,8 +106,12 @@ func Action(blobBytes []byte, AMIBuildConfigFilename string) bool {
prHeadRef := OWNER + ":" + headRef
prBaseRef := baseRef

log.Print("Info: line 109 getref call STARTED")

// check if the required head branch already exists
ref, _, err := client.Git.GetRef(ctx, OWNER, REPO, headRef)
log.Print("Info: line 109 getref call COMPLETED")

if err == nil {
prListOpts := github.PullRequestListOptions{
Head: prHeadRef,
Expand Down Expand Up @@ -205,6 +209,7 @@ func GetGithubClientCtx(token string) (*github.Client, context.Context) {
}

func CreateRef(client *github.Client, ctx context.Context, fromRef, toRef string) *github.Reference {
log.Print("Info: line 208 getref call ")
ref, _, err := client.Git.GetRef(ctx, OWNER, REPO, fromRef)
custom.CheckError(err)

Expand Down

0 comments on commit 51ee841

Please sign in to comment.