Skip to content

Commit

Permalink
circleci: fixed panic on master branch (#293)
Browse files Browse the repository at this point in the history
  • Loading branch information
giautm authored Jan 2, 2025
1 parent 58a63b6 commit 55188ac
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions atlasaction/circleci_action.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,12 @@ func (a *circleCIOrb) GetTriggerContext(ctx context.Context) (*TriggerContext, e
if err != nil {
return nil, fmt.Errorf("failed to get open pull requests: %w", err)
}
tc.PullRequest = &PullRequest{
Number: pr.Number,
URL: pr.URL,
Commit: pr.Commit,
if pr != nil {
tc.PullRequest = &PullRequest{
Number: pr.Number,
URL: pr.URL,
Commit: pr.Commit,
}
}
}
return tc, nil
Expand Down

0 comments on commit 55188ac

Please sign in to comment.