-
Notifications
You must be signed in to change notification settings - Fork 234
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
added issue comment hook support for Azure #200
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there any other types of events for the comment webhook eg for github there are a number of different actions
go-scm/scm/driver/github/webhook.go
Lines 132 to 142 in 37ec420
switch src.Action { | |
case "created": | |
dst.Action = scm.ActionCreate | |
case "edited": | |
dst.Action = scm.ActionEdit | |
case "deleted": | |
dst.Action = scm.ActionDelete | |
default: | |
dst.Action = scm.ActionUnknown | |
} | |
return dst, nil |
@tphoney Added |
@@ -67,6 +67,8 @@ func (a Action) String() (s string) { | |||
return "synchronized" | |||
case ActionMerge: | |||
return "merged" | |||
case ActionEdit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this not really as update and edit are synonyms
case ActionUpdate:
return "updated"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tphoney We can't keep this as Update since in triggers we have already defined an edit action on UI. We just checked since ActionEdit was not being passed Github IssueComment trigger with Edit action was not triggering so we need to pass this value. You can check below snippet.
go-scm/scm/driver/github/webhook.go
Line 135 in bff9695
case "edited": |
@@ -67,6 +67,8 @@ func (a Action) String() (s string) { | |||
return "synchronized" | |||
case ActionMerge: | |||
return "merged" | |||
case ActionEdit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bradrydzewski how do you feel about adding this new action, it does seem to be referenced in some of the drivers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this refers to updating pull request code we should use the synchronized
action (which is the abstracted term we use for all providers) or if this refers to updating pull request metadata (tltle, description, status, etc) we should use the update
action.
See some of the existing implementations for prior art:
https://github.com/drone/go-scm/blob/master/scm/driver/github/webhook.go#L159:L160
@@ -67,6 +67,8 @@ func (a Action) String() (s string) { | |||
return "synchronized" | |||
case ActionMerge: | |||
return "merged" | |||
case ActionEdit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this refers to updating pull request code we should use the synchronized
action (which is the abstracted term we use for all providers) or if this refers to updating pull request metadata (tltle, description, status, etc) we should use the update
action.
See some of the existing implementations for prior art:
https://github.com/drone/go-scm/blob/master/scm/driver/github/webhook.go#L159:L160
No description provided.