Skip to content

Commit

Permalink
Merge branch 'main' into SRVKP-5834
Browse files Browse the repository at this point in the history
  • Loading branch information
chmouel authored Feb 11, 2025
2 parents 6a18b99 + 04127aa commit de3a59e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .tekton/prow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ metadata:
name: prow-commands
annotations:
pipelinesascode.tekton.dev/pipeline: "https://raw.githubusercontent.com/openshift-pipelines/pipelines-as-code-prow/refs/heads/main/pipeline-prow.yaml"
pipelinesascode.tekton.dev/on-comment: "^/(help|merge|lgtm|(assign|unassign|label|unlabel)[ ].*)$"
pipelinesascode.tekton.dev/on-comment: "^/(help|rebase|merge|lgtm|(assign|unassign|label|unlabel)[ ].*)$"
pipelinesascode.tekton.dev/max-keep-runs: "2"
spec:
params:
- name: trigger_comment
value: |
value: |-
{{ trigger_comment }}
- name: repo_owner
value: "{{ repo_owner }}"
Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/guide/authoringprs.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ You will encounter a YAML validation error because objects or multiline strings
spec:
params:
- name: body
value: |
value: |-
{{ body }}
# Alternatively, use '>' to specify that the value will be in block format
- name: pull_request
Expand Down
5 changes: 3 additions & 2 deletions pkg/provider/github/parse_payload.go
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,9 @@ func (v *Provider) handleCommitCommentEvent(ctx context.Context, event *github.C
runevent.TriggerTarget = triggertype.Push
opscomments.SetEventTypeAndTargetPR(runevent, event.GetComment().GetBody())

// Set main as default branch to runevent.HeadBranch, runevent.BaseBranch
runevent.HeadBranch, runevent.BaseBranch = "main", "main"
defaultBranch := event.GetRepo().GetDefaultBranch()
// Set Event.Repository.DefaultBranch as default branch to runevent.HeadBranch, runevent.BaseBranch
runevent.HeadBranch, runevent.BaseBranch = defaultBranch, defaultBranch
var (
branchName string
prName string
Expand Down
2 changes: 1 addition & 1 deletion pkg/provider/github/parse_payload_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ var sampleRepo = &github.Repository{
Login: github.Ptr("owner"),
},
Name: github.Ptr("reponame"),
DefaultBranch: github.Ptr("defaultbranch"),
DefaultBranch: github.Ptr("main"),
HTMLURL: github.Ptr("https://github.com/owner/repo"),
}

Expand Down

0 comments on commit de3a59e

Please sign in to comment.