Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ref should be branch name for harness code #288

Merged
merged 2 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions scm/driver/harness/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ func (s *repositoryService) CreateHook(ctx context.Context, repo string, input *
in := new(hook)
in.Enabled = true
in.DisplayName = input.Name
in.UID = input.Name
in.Secret = input.Secret
in.Insecure = input.SkipVerify
in.URL = input.Target
Expand Down Expand Up @@ -134,6 +135,7 @@ type (
HasSecret bool `json:"has_secret"`
Secret string `json:"secret"`
ID int `json:"id"`
UID string `json:"uid"`
Insecure bool `json:"insecure"`
LatestExecutionResult string `json:"latest_execution_result"`
ParentID int `json:"parent_id"`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"Ref": "aeafa0e2e4ec6909ad75cb8fad57c0b1eb5986e6",
"Ref": "refs/heads/new2",
"Before": "0000000000000000000000000000000000000000",
"After": "aeafa0e2e4ec6909ad75cb8fad57c0b1eb5986e6",
"Repo": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"Ref": "92e21bfcddc1418079cddbb518ad6fd72917798a",
"Ref": "refs/heads/master",
"Before": "a273c385628167932e10caaa58e12550c491f241",
"After": "92e21bfcddc1418079cddbb518ad6fd72917798a",
"Repo": {
Expand Down
2 changes: 1 addition & 1 deletion scm/driver/harness/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ func convertPullRequestHook(src *pullRequestHook) *scm.PullRequestHook {

func convertPushHook(src *pushHook) *scm.PushHook {
return &scm.PushHook{
Ref: src.Sha,
Ref: src.Ref.Name,
Before: src.OldSha,
After: src.Sha,
Repo: convertRepo(src.Repo),
Expand Down