Skip to content

Commit

Permalink
Merge pull request #5 from opensourceways/hrz-930
Browse files Browse the repository at this point in the history
issue,pr指派人问题
  • Loading branch information
shishupei authored Oct 15, 2024
2 parents 4eaf9a4 + 82fbc1f commit e28ac5a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion models/dto/cloud_event.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func (event CloudEvents) Message() ([]byte, error) {
func (event CloudEvents) SaveDb() error {
eventDO := event.toCloudEventDO()
result := postgresql.DB().Clauses(clause.OnConflict{
Columns: []clause.Column{{Name: "event_id"}, {Name: "source"}},
Columns: []clause.Column{{Name: "event_id"}},
DoUpdates: clause.AssignmentColumns([]string{"event_id", "source_url", "source_group",
"summary", "data_schema", "data_content_type", "spec_version", "time", "user",
"data_json", "title", "related_users", "mail_title", "mail_summary"}),
Expand Down
1 change: 1 addition & 0 deletions models/dto/gitee.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ type GiteePrRaw struct {
SigGroupName string `json:"sig_group_name"`
SigMaintainers []string `json:"sig_maintainers"`
RepoAdmins []string `json:"repo_admins"`
Assignees []string `json:"assignees"`
}

// GiteeNoteRaw gitee note raw.
Expand Down
5 changes: 5 additions & 0 deletions service/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,12 @@ func GiteePrHandle(payload []byte, _ map[string]string) error {
if err != nil {
return err
}
var assignees []string
for _, dt := range raw.PullRequest.Assignees {
assignees = append(assignees, dt.Login)
}

raw.Assignees = assignees
raw.SigGroupName = sigGroupName
raw.SigMaintainers = sigMaintainers
raw.RepoAdmins = repoAdmins
Expand Down

0 comments on commit e28ac5a

Please sign in to comment.