Skip to content

Commit

Permalink
fix spelling error pulrequest -> pullrequest
Browse files Browse the repository at this point in the history
we have a spelling error in the bitbucketserver provider, it's minor but
annoying so let's fix this
  • Loading branch information
chmouel committed Oct 31, 2024
1 parent b2602dd commit ec28b61
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
22 changes: 11 additions & 11 deletions pkg/provider/bitbucketserver/parse_payload.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,23 +72,23 @@ func (v *Provider) ParsePayload(_ context.Context, _ *params.Run, request *http.
}
}
// TODO: It's Really not an OWNER but a PROJECT
processedEvent.Organization = e.PulRequest.ToRef.Repository.Project.Key
processedEvent.Repository = e.PulRequest.ToRef.Repository.Name
processedEvent.SHA = e.PulRequest.FromRef.LatestCommit
processedEvent.PullRequestNumber = e.PulRequest.ID
processedEvent.URL = e.PulRequest.ToRef.Repository.Links.Self[0].Href
processedEvent.BaseBranch = e.PulRequest.ToRef.DisplayID
processedEvent.HeadBranch = e.PulRequest.FromRef.DisplayID
processedEvent.BaseURL = e.PulRequest.ToRef.Repository.Links.Self[0].Href
processedEvent.HeadURL = e.PulRequest.FromRef.Repository.Links.Self[0].Href
processedEvent.Organization = e.PullRequest.ToRef.Repository.Project.Key
processedEvent.Repository = e.PullRequest.ToRef.Repository.Name
processedEvent.SHA = e.PullRequest.FromRef.LatestCommit
processedEvent.PullRequestNumber = e.PullRequest.ID
processedEvent.URL = e.PullRequest.ToRef.Repository.Links.Self[0].Href
processedEvent.BaseBranch = e.PullRequest.ToRef.DisplayID
processedEvent.HeadBranch = e.PullRequest.FromRef.DisplayID
processedEvent.BaseURL = e.PullRequest.ToRef.Repository.Links.Self[0].Href
processedEvent.HeadURL = e.PullRequest.FromRef.Repository.Links.Self[0].Href
processedEvent.AccountID = fmt.Sprintf("%d", e.Actor.ID)
processedEvent.Sender = e.Actor.Name
for _, value := range e.PulRequest.FromRef.Repository.Links.Clone {
for _, value := range e.PullRequest.FromRef.Repository.Links.Clone {
if value.Name == "http" {
processedEvent.CloneURL = value.Href
}
}
v.pullRequestNumber = e.PulRequest.ID
v.pullRequestNumber = e.PullRequest.ID
case *types.PushRequestEvent:
processedEvent.Event = "push"
processedEvent.TriggerTarget = "push"
Expand Down
4 changes: 2 additions & 2 deletions pkg/provider/bitbucketserver/test/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func MakeEvent(event *info.Event) *info.Event {
}
if rev.Event == nil {
rev.Event = &types.PullRequestEvent{
PulRequest: bbv1.PullRequest{ID: 666},
PullRequest: bbv1.PullRequest{ID: 666},
}
}
return rev
Expand Down Expand Up @@ -270,7 +270,7 @@ func MakePREvent(event *info.Event, comment string) *types.PullRequestEvent {

pr := &types.PullRequestEvent{
Actor: types.EventActor{ID: iii, Name: event.Sender},
PulRequest: bbv1.PullRequest{
PullRequest: bbv1.PullRequest{
ToRef: bbv1.PullRequestRef{
Repository: bbv1.Repository{
Project: &bbv1.Project{Key: event.Organization},
Expand Down
6 changes: 3 additions & 3 deletions pkg/provider/bitbucketserver/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ type EventActor struct {
}

type PullRequestEvent struct {
Actor EventActor
PulRequest bbv1.PullRequest `json:"pullRequest"`
Comment bbv1.Comment `json:"comment"`
Actor EventActor
PullRequest bbv1.PullRequest `json:"pullRequest"`
Comment bbv1.Comment `json:"comment"`
}

type PushRequestEventChange struct {
Expand Down

0 comments on commit ec28b61

Please sign in to comment.