-
Notifications
You must be signed in to change notification settings - Fork 241
added issue comment hook support for Azure #200
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. If this refers to updating pull request code we should use the See some of the existing implementations for prior art: |
||
return "edited" | ||
default: | ||
return | ||
} | ||
|
@@ -104,6 +106,8 @@ func (a *Action) UnmarshalJSON(data []byte) error { | |
*a = ActionSync | ||
case "merged": | ||
*a = ActionMerge | ||
case "edited": | ||
*a = ActionEdit | ||
} | ||
return nil | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
{ | ||
"subscriptionId": "00000000-0000-0000-0000-000000000000", | ||
"notificationId": 2, | ||
"id": "af07be1b-f3ad-44c8-a7f1-c4835f2df06b", | ||
"eventType": "ms.vss-code.git-pullrequest-comment-event", | ||
"publisherId": "tfs", | ||
"message": { | ||
"text": "Jamal Hartnett has edited a pull request comment", | ||
"html": "Jamal Hartnett has <a href=\"https://fabrikam.visualstudio.com/DefaultCollection/_git/Fabrikam/pullrequest/1?discussionId=5\">edited</a> a pull request comment", | ||
"markdown": "Jamal Hartnett has [edited](https://fabrikam.visualstudio.com/DefaultCollection/_git/Fabrikam/pullrequest/1?discussionId=5) a pull request comment" | ||
}, | ||
"detailedMessage": { | ||
"text": "Jamal Hartnett has edited a pull request comment\r\nThis is my comment.\r\n", | ||
"html": "Jamal Hartnett has <a href=\"https://fabrikam.visualstudio.com/DefaultCollection/_git/Fabrikam/pullrequest/1?discussionId=5\">edited</a> a pull request comment<p>This is my comment.</p>", | ||
"markdown": "Jamal Hartnett has [edited](https://fabrikam.visualstudio.com/DefaultCollection/_git/Fabrikam/pullrequest/1?discussionId=5) a pull request comment\r\nThis is my comment.\r\n" | ||
}, | ||
"resource": { | ||
"comment": { | ||
"id": 2, | ||
"parentCommentId": 1, | ||
"author": { | ||
"displayName": "Jamal Hartnett", | ||
"url": "https://fabrikam.vssps.visualstudio.com/_apis/Identities/54d125f7-69f7-4191-904f-c5b96b6261c8", | ||
"id": "54d125f7-69f7-4191-904f-c5b96b6261c8", | ||
"uniqueName": "[email protected]", | ||
"imageUrl": "https://fabrikam.visualstudio.com/DefaultCollection/_api/_common/identityImage?id=54d125f7-69f7-4191-904f-c5b96b6261c8" | ||
}, | ||
"content": "This is my comment.", | ||
"publishedDate": "2014-06-17T16:55:46.589889Z", | ||
"lastUpdatedDate": "2014-06-17T16:55:46.589889Z", | ||
"lastContentUpdatedDate": "2014-06-17T16:58:33.123889Z", | ||
"commentType": "text", | ||
"_links": { | ||
"self": { | ||
"href": "https://fabrikam.visualstudio.com/DefaultCollection/_apis/git/repositories/4bc14d40-c903-45e2-872e-0462c7748079/pullRequests/1/threads/5/comments/2" | ||
}, | ||
"repository": { | ||
"href": "http://joscol2/DefaultCollection/ebed510c-62eb-474b-965f-fd151ebb82e4/_apis/git/repositories/4bc14d40-c903-45e2-872e-0462c7748079" | ||
}, | ||
"threads": { | ||
"href": "https://fabrikam.visualstudio.com/DefaultCollection/_apis/git/repositories/4bc14d40-c903-45e2-872e-0462c7748079/pullRequests/1/threads/5" | ||
} | ||
} | ||
}, | ||
"pullRequest": { | ||
"repository": { | ||
"id": "4bc14d40-c903-45e2-872e-0462c7748079", | ||
"name": "Fabrikam", | ||
"url": "https://fabrikam.visualstudio.com/DefaultCollection/_apis/git/repositories/4bc14d40-c903-45e2-872e-0462c7748079", | ||
"project": { | ||
"id": "6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c", | ||
"name": "Fabrikam", | ||
"url": "https://fabrikam.visualstudio.com/DefaultCollection/_apis/projects/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c", | ||
"state": "wellFormed", | ||
"visibility": "unchanged", | ||
"lastUpdateTime": "0001-01-01T00:00:00" | ||
}, | ||
"sshUrl": "[email protected]:v3/fabrikam/DefaultCollection/Fabrikam", | ||
"webUrl": "https://dev.azure.com/fabrikam/DefaultCollection/_git/Fabrikam", | ||
"remoteUrl": "https://fabrikam.visualstudio.com/DefaultCollection/_git/Fabrikam" | ||
}, | ||
"pullRequestId": 1, | ||
"status": "active", | ||
"createdBy": { | ||
"displayName": "Jamal Hartnett", | ||
"url": "https://fabrikam.vssps.visualstudio.com/_apis/Identities/54d125f7-69f7-4191-904f-c5b96b6261c8", | ||
"id": "54d125f7-69f7-4191-904f-c5b96b6261c8", | ||
"uniqueName": "[email protected]", | ||
"imageUrl": "https://fabrikam.visualstudio.com/DefaultCollection/_api/_common/identityImage?id=54d125f7-69f7-4191-904f-c5b96b6261c8" | ||
}, | ||
"creationDate": "2014-06-17T16:55:46.589889Z", | ||
"title": "my first pull request", | ||
"description": " - test2\r\n", | ||
"sourceRefName": "refs/heads/mytopic", | ||
"targetRefName": "refs/heads/master", | ||
"mergeStatus": "succeeded", | ||
"mergeId": "a10bb228-6ba6-4362-abd7-49ea21333dbd", | ||
"lastMergeSourceCommit": { | ||
"commitId": "53d54ac915144006c2c9e90d2c7d3880920db49c", | ||
"url": "https://fabrikam.visualstudio.com/DefaultCollection/_apis/git/repositories/4bc14d40-c903-45e2-872e-0462c7748079/commits/53d54ac915144006c2c9e90d2c7d3880920db49c" | ||
}, | ||
"lastMergeTargetCommit": { | ||
"commitId": "a511f535b1ea495ee0c903badb68fbc83772c882", | ||
"url": "https://fabrikam.visualstudio.com/DefaultCollection/_apis/git/repositories/4bc14d40-c903-45e2-872e-0462c7748079/commits/a511f535b1ea495ee0c903badb68fbc83772c882" | ||
}, | ||
"lastMergeCommit": { | ||
"commitId": "eef717f69257a6333f221566c1c987dc94cc0d72", | ||
"url": "https://fabrikam.visualstudio.com/DefaultCollection/_apis/git/repositories/4bc14d40-c903-45e2-872e-0462c7748079/commits/eef717f69257a6333f221566c1c987dc94cc0d72" | ||
}, | ||
"reviewers": [ | ||
{ | ||
"reviewerUrl": null, | ||
"vote": 0, | ||
"displayName": "[Mobile]\\Mobile Team", | ||
"url": "https://fabrikam.vssps.visualstudio.com/_apis/Identities/2ea2d095-48f9-4cd6-9966-62f6f574096c", | ||
"id": "2ea2d095-48f9-4cd6-9966-62f6f574096c", | ||
"uniqueName": "vstfs:///Classification/TeamProject/f0811a3b-8c8a-4e43-a3bf-9a049b4835bd\\Mobile Team", | ||
"imageUrl": "https://fabrikam.visualstudio.com/DefaultCollection/_api/_common/identityImage?id=2ea2d095-48f9-4cd6-9966-62f6f574096c", | ||
"isContainer": true | ||
} | ||
], | ||
"commits": [ | ||
{ | ||
"commitId": "53d54ac915144006c2c9e90d2c7d3880920db49c", | ||
"url": "https://fabrikam.visualstudio.com/DefaultCollection/_apis/git/repositories/4bc14d40-c903-45e2-872e-0462c7748079/commits/53d54ac915144006c2c9e90d2c7d3880920db49c" | ||
} | ||
], | ||
"url": "https://fabrikam.visualstudio.com/DefaultCollection/_apis/git/repositories/4bc14d40-c903-45e2-872e-0462c7748079/pullRequests/1", | ||
"_links": { | ||
"web": { | ||
"href": "https://fabrikam.visualstudio.com/DefaultCollection/_git/Fabrikam/pullrequest/1#view=discussion" | ||
}, | ||
"statuses": { | ||
"href": "https://fabrikam.visualstudio.com/DefaultCollection/_apis/git/repositories/4bc14d40-c903-45e2-872e-0462c7748079/pullRequests/1/statuses" | ||
} | ||
} | ||
} | ||
}, | ||
"resourceVersion": "2.0", | ||
"resourceContainers": { | ||
"collection": { | ||
"id": "c12d0eb8-e382-443b-9f9c-c52cba5014c2" | ||
}, | ||
"account": { | ||
"id": "f844ec47-a9db-4511-8281-8b63f4eaf94e" | ||
}, | ||
"project": { | ||
"id": "be9b3917-87e6-42a4-a549-2bc06a7a878f" | ||
} | ||
}, | ||
"createdDate": "2022-06-21T13:03:20.480894Z" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
{ | ||
"Action": "created", | ||
"Repo": { | ||
"ID": "4bc14d40-c903-45e2-872e-0462c7748079", | ||
"Namespace": "Fabrikam", | ||
"Name": "Fabrikam", | ||
"Perm": null, | ||
"Branch": "mytopic", | ||
"Archived": false, | ||
"Private": false, | ||
"Visibility": 0, | ||
"Clone": "https://dev.azure.com/fabrikam/DefaultCollection/_git/Fabrikam", | ||
"CloneSSH": "[email protected]:v3/fabrikam/DefaultCollection/Fabrikam", | ||
"Link": "https://dev.azure.com/fabrikam/DefaultCollection/_git/Fabrikam", | ||
"Created": "0001-01-01T00:00:00Z", | ||
"Updated": "0001-01-01T00:00:00Z" | ||
}, | ||
"Issue": { | ||
"Number": 1, | ||
"Title": "my first pull request", | ||
"Body": " - test2\r\n", | ||
"Link": "https://fabrikam.visualstudio.com/DefaultCollection/_apis/git/repositories/4bc14d40-c903-45e2-872e-0462c7748079/pullRequests/1", | ||
"Author": { | ||
"Login": "Jamal Hartnett", | ||
"Name": "Jamal Hartnett", | ||
"Email": "[email protected]", | ||
"Avatar": "https://fabrikam.visualstudio.com/DefaultCollection/_api/_common/identityImage?id=54d125f7-69f7-4191-904f-c5b96b6261c8", | ||
"Created": "0001-01-01T00:00:00Z", | ||
"Updated": "0001-01-01T00:00:00Z" | ||
}, | ||
"PullRequest": { | ||
"Number": 1, | ||
"Title": "my first pull request", | ||
"Body": " - test2\r\n", | ||
"Sha": "53d54ac915144006c2c9e90d2c7d3880920db49c", | ||
"Ref": "refs/heads/mytopic", | ||
"Source": "mytopic", | ||
"Target": "master", | ||
"Fork": "", | ||
"Link": "https://fabrikam.visualstudio.com/DefaultCollection/_apis/git/repositories/4bc14d40-c903-45e2-872e-0462c7748079/pullRequests/1", | ||
"Diff": "", | ||
"Closed": false, | ||
"Merged": false, | ||
"Base": { | ||
"Name": "", | ||
"Path": "", | ||
"Sha": "" | ||
}, | ||
"Head": { | ||
"Name": "", | ||
"Path": "", | ||
"Sha": "" | ||
}, | ||
"Author": { | ||
"Login": "Jamal Hartnett", | ||
"Name": "Jamal Hartnett", | ||
"Email": "[email protected]", | ||
"Avatar": "https://fabrikam.visualstudio.com/DefaultCollection/_api/_common/identityImage?id=54d125f7-69f7-4191-904f-c5b96b6261c8", | ||
"Created": "0001-01-01T00:00:00Z", | ||
"Updated": "0001-01-01T00:00:00Z" | ||
}, | ||
"Created": "2014-06-17T16:55:46.589889Z", | ||
"Updated": "0001-01-01T00:00:00Z", | ||
"Labels": null | ||
}, | ||
"Created": "2014-06-17T16:55:46.589889Z" | ||
}, | ||
"Comment": { | ||
"ID": 2, | ||
"Body": "This is my comment.", | ||
"Author": { | ||
"Login": "54d125f7-69f7-4191-904f-c5b96b6261c8", | ||
"Name": "Jamal Hartnett", | ||
"Email": "[email protected]", | ||
"Created": "0001-01-01T00:00:00Z", | ||
"Updated": "0001-01-01T00:00:00Z" | ||
}, | ||
"Created": "2014-06-17T16:55:46.589889Z", | ||
"Updated": "2014-06-17T16:55:46.589889Z" | ||
}, | ||
"Sender": { | ||
"Login": "54d125f7-69f7-4191-904f-c5b96b6261c8", | ||
"Name": "Jamal Hartnett", | ||
"Email": "[email protected]", | ||
"Created": "0001-01-01T00:00:00Z", | ||
"Updated": "0001-01-01T00:00:00Z" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
{ | ||
"subscriptionId": "00000000-0000-0000-0000-000000000000", | ||
"notificationId": 2, | ||
"id": "af07be1b-f3ad-44c8-a7f1-c4835f2df06b", | ||
"eventType": "ms.vss-code.git-pullrequest-comment-event", | ||
"publisherId": "tfs", | ||
"message": { | ||
"text": "Jamal Hartnett has edited a pull request comment", | ||
"html": "Jamal Hartnett has <a href=\"https://fabrikam.visualstudio.com/DefaultCollection/_git/Fabrikam/pullrequest/1?discussionId=5\">edited</a> a pull request comment", | ||
"markdown": "Jamal Hartnett has [edited](https://fabrikam.visualstudio.com/DefaultCollection/_git/Fabrikam/pullrequest/1?discussionId=5) a pull request comment" | ||
}, | ||
"detailedMessage": { | ||
"text": "Jamal Hartnett has edited a pull request comment\r\nThis is my comment.\r\n", | ||
"html": "Jamal Hartnett has <a href=\"https://fabrikam.visualstudio.com/DefaultCollection/_git/Fabrikam/pullrequest/1?discussionId=5\">edited</a> a pull request comment<p>This is my comment.</p>", | ||
"markdown": "Jamal Hartnett has [edited](https://fabrikam.visualstudio.com/DefaultCollection/_git/Fabrikam/pullrequest/1?discussionId=5) a pull request comment\r\nThis is my comment.\r\n" | ||
}, | ||
"resource": { | ||
"comment": { | ||
"id": 2, | ||
"parentCommentId": 1, | ||
"author": { | ||
"displayName": "Jamal Hartnett", | ||
"url": "https://fabrikam.vssps.visualstudio.com/_apis/Identities/54d125f7-69f7-4191-904f-c5b96b6261c8", | ||
"id": "54d125f7-69f7-4191-904f-c5b96b6261c8", | ||
"uniqueName": "[email protected]", | ||
"imageUrl": "https://fabrikam.visualstudio.com/DefaultCollection/_api/_common/identityImage?id=54d125f7-69f7-4191-904f-c5b96b6261c8" | ||
}, | ||
"content": "This is my comment.", | ||
"publishedDate": "2014-06-17T16:55:46.589889Z", | ||
"lastUpdatedDate": "2014-06-17T16:58:33.123889Z", | ||
"lastContentUpdatedDate": "2014-06-17T16:58:33.123889Z", | ||
"commentType": "text", | ||
"isDeleted": true, | ||
"_links": { | ||
"self": { | ||
"href": "https://fabrikam.visualstudio.com/DefaultCollection/_apis/git/repositories/4bc14d40-c903-45e2-872e-0462c7748079/pullRequests/1/threads/5/comments/2" | ||
}, | ||
"repository": { | ||
"href": "http://joscol2/DefaultCollection/ebed510c-62eb-474b-965f-fd151ebb82e4/_apis/git/repositories/4bc14d40-c903-45e2-872e-0462c7748079" | ||
}, | ||
"threads": { | ||
"href": "https://fabrikam.visualstudio.com/DefaultCollection/_apis/git/repositories/4bc14d40-c903-45e2-872e-0462c7748079/pullRequests/1/threads/5" | ||
} | ||
} | ||
}, | ||
"pullRequest": { | ||
"repository": { | ||
"id": "4bc14d40-c903-45e2-872e-0462c7748079", | ||
"name": "Fabrikam", | ||
"url": "https://fabrikam.visualstudio.com/DefaultCollection/_apis/git/repositories/4bc14d40-c903-45e2-872e-0462c7748079", | ||
"project": { | ||
"id": "6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c", | ||
"name": "Fabrikam", | ||
"url": "https://fabrikam.visualstudio.com/DefaultCollection/_apis/projects/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c", | ||
"state": "wellFormed", | ||
"visibility": "unchanged", | ||
"lastUpdateTime": "0001-01-01T00:00:00" | ||
}, | ||
"sshUrl": "[email protected]:v3/fabrikam/DefaultCollection/Fabrikam", | ||
"webUrl": "https://dev.azure.com/fabrikam/DefaultCollection/_git/Fabrikam", | ||
"remoteUrl": "https://fabrikam.visualstudio.com/DefaultCollection/_git/Fabrikam" | ||
}, | ||
"pullRequestId": 1, | ||
"status": "active", | ||
"createdBy": { | ||
"displayName": "Jamal Hartnett", | ||
"url": "https://fabrikam.vssps.visualstudio.com/_apis/Identities/54d125f7-69f7-4191-904f-c5b96b6261c8", | ||
"id": "54d125f7-69f7-4191-904f-c5b96b6261c8", | ||
"uniqueName": "[email protected]", | ||
"imageUrl": "https://fabrikam.visualstudio.com/DefaultCollection/_api/_common/identityImage?id=54d125f7-69f7-4191-904f-c5b96b6261c8" | ||
}, | ||
"creationDate": "2014-06-17T16:55:46.589889Z", | ||
"title": "my first pull request", | ||
"description": " - test2\r\n", | ||
"sourceRefName": "refs/heads/mytopic", | ||
"targetRefName": "refs/heads/master", | ||
"mergeStatus": "succeeded", | ||
"mergeId": "a10bb228-6ba6-4362-abd7-49ea21333dbd", | ||
"lastMergeSourceCommit": { | ||
"commitId": "53d54ac915144006c2c9e90d2c7d3880920db49c", | ||
"url": "https://fabrikam.visualstudio.com/DefaultCollection/_apis/git/repositories/4bc14d40-c903-45e2-872e-0462c7748079/commits/53d54ac915144006c2c9e90d2c7d3880920db49c" | ||
}, | ||
"lastMergeTargetCommit": { | ||
"commitId": "a511f535b1ea495ee0c903badb68fbc83772c882", | ||
"url": "https://fabrikam.visualstudio.com/DefaultCollection/_apis/git/repositories/4bc14d40-c903-45e2-872e-0462c7748079/commits/a511f535b1ea495ee0c903badb68fbc83772c882" | ||
}, | ||
"lastMergeCommit": { | ||
"commitId": "eef717f69257a6333f221566c1c987dc94cc0d72", | ||
"url": "https://fabrikam.visualstudio.com/DefaultCollection/_apis/git/repositories/4bc14d40-c903-45e2-872e-0462c7748079/commits/eef717f69257a6333f221566c1c987dc94cc0d72" | ||
}, | ||
"reviewers": [ | ||
{ | ||
"reviewerUrl": null, | ||
"vote": 0, | ||
"displayName": "[Mobile]\\Mobile Team", | ||
"url": "https://fabrikam.vssps.visualstudio.com/_apis/Identities/2ea2d095-48f9-4cd6-9966-62f6f574096c", | ||
"id": "2ea2d095-48f9-4cd6-9966-62f6f574096c", | ||
"uniqueName": "vstfs:///Classification/TeamProject/f0811a3b-8c8a-4e43-a3bf-9a049b4835bd\\Mobile Team", | ||
"imageUrl": "https://fabrikam.visualstudio.com/DefaultCollection/_api/_common/identityImage?id=2ea2d095-48f9-4cd6-9966-62f6f574096c", | ||
"isContainer": true | ||
} | ||
], | ||
"commits": [ | ||
{ | ||
"commitId": "53d54ac915144006c2c9e90d2c7d3880920db49c", | ||
"url": "https://fabrikam.visualstudio.com/DefaultCollection/_apis/git/repositories/4bc14d40-c903-45e2-872e-0462c7748079/commits/53d54ac915144006c2c9e90d2c7d3880920db49c" | ||
} | ||
], | ||
"url": "https://fabrikam.visualstudio.com/DefaultCollection/_apis/git/repositories/4bc14d40-c903-45e2-872e-0462c7748079/pullRequests/1", | ||
"_links": { | ||
"web": { | ||
"href": "https://fabrikam.visualstudio.com/DefaultCollection/_git/Fabrikam/pullrequest/1#view=discussion" | ||
}, | ||
"statuses": { | ||
"href": "https://fabrikam.visualstudio.com/DefaultCollection/_apis/git/repositories/4bc14d40-c903-45e2-872e-0462c7748079/pullRequests/1/statuses" | ||
} | ||
} | ||
} | ||
}, | ||
"resourceVersion": "2.0", | ||
"resourceContainers": { | ||
"collection": { | ||
"id": "c12d0eb8-e382-443b-9f9c-c52cba5014c2" | ||
}, | ||
"account": { | ||
"id": "f844ec47-a9db-4511-8281-8b63f4eaf94e" | ||
}, | ||
"project": { | ||
"id": "be9b3917-87e6-42a4-a549-2bc06a7a878f" | ||
} | ||
}, | ||
"createdDate": "2022-06-21T13:03:20.480894Z" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
{ | ||
"Action": "deleted", | ||
"Repo": { | ||
"ID": "4bc14d40-c903-45e2-872e-0462c7748079", | ||
"Namespace": "Fabrikam", | ||
"Name": "Fabrikam", | ||
"Perm": null, | ||
"Branch": "mytopic", | ||
"Archived": false, | ||
"Private": false, | ||
"Visibility": 0, | ||
"Clone": "https://dev.azure.com/fabrikam/DefaultCollection/_git/Fabrikam", | ||
"CloneSSH": "git@ssh.dev.azure.com:v3/fabrikam/DefaultCollection/Fabrikam", | ||
"Link": "https://dev.azure.com/fabrikam/DefaultCollection/_git/Fabrikam", | ||
"Created": "0001-01-01T00:00:00Z", | ||
"Updated": "0001-01-01T00:00:00Z" | ||
}, | ||
"Issue": { | ||
"Number": 1, | ||
"Title": "my first pull request", | ||
"Body": " - test2\r\n", | ||
"Link": "https://fabrikam.visualstudio.com/DefaultCollection/_apis/git/repositories/4bc14d40-c903-45e2-872e-0462c7748079/pullRequests/1", | ||
"Author": { | ||
"Login": "Jamal Hartnett", | ||
"Name": "Jamal Hartnett", | ||
"Email": "fabrikamfiber4@hotmail.com", | ||
"Avatar": "https://fabrikam.visualstudio.com/DefaultCollection/_api/_common/identityImage?id=54d125f7-69f7-4191-904f-c5b96b6261c8", | ||
"Created": "0001-01-01T00:00:00Z", | ||
"Updated": "0001-01-01T00:00:00Z" | ||
}, | ||
"PullRequest": { | ||
"Number": 1, | ||
"Title": "my first pull request", | ||
"Body": " - test2\r\n", | ||
"Sha": "53d54ac915144006c2c9e90d2c7d3880920db49c", | ||
"Ref": "refs/heads/mytopic", | ||
"Source": "mytopic", | ||
"Target": "master", | ||
"Fork": "", | ||
"Link": "https://fabrikam.visualstudio.com/DefaultCollection/_apis/git/repositories/4bc14d40-c903-45e2-872e-0462c7748079/pullRequests/1", | ||
"Diff": "", | ||
"Closed": false, | ||
"Merged": false, | ||
"Base": { | ||
"Name": "", | ||
"Path": "", | ||
"Sha": "" | ||
}, | ||
"Head": { | ||
"Name": "", | ||
"Path": "", | ||
"Sha": "" | ||
}, | ||
"Author": { | ||
"Login": "Jamal Hartnett", | ||
"Name": "Jamal Hartnett", | ||
"Email": "fabrikamfiber4@hotmail.com", | ||
"Avatar": "https://fabrikam.visualstudio.com/DefaultCollection/_api/_common/identityImage?id=54d125f7-69f7-4191-904f-c5b96b6261c8", | ||
"Created": "0001-01-01T00:00:00Z", | ||
"Updated": "0001-01-01T00:00:00Z" | ||
}, | ||
"Created": "2014-06-17T16:55:46.589889Z", | ||
"Updated": "0001-01-01T00:00:00Z", | ||
"Labels": null | ||
}, | ||
"Created": "2014-06-17T16:55:46.589889Z" | ||
}, | ||
"Comment": { | ||
"ID": 2, | ||
"Body": "This is my comment.", | ||
"Author": { | ||
"Login": "54d125f7-69f7-4191-904f-c5b96b6261c8", | ||
"Name": "Jamal Hartnett", | ||
"Email": "fabrikamfiber4@hotmail.com", | ||
"Created": "0001-01-01T00:00:00Z", | ||
"Updated": "0001-01-01T00:00:00Z" | ||
}, | ||
"Created": "2014-06-17T16:55:46.589889Z", | ||
"Updated": "2014-06-17T16:58:33.123889Z" | ||
}, | ||
"Sender": { | ||
"Login": "54d125f7-69f7-4191-904f-c5b96b6261c8", | ||
"Name": "Jamal Hartnett", | ||
"Email": "fabrikamfiber4@hotmail.com", | ||
"Created": "0001-01-01T00:00:00Z", | ||
"Updated": "0001-01-01T00:00:00Z" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
{ | ||
"subscriptionId": "00000000-0000-0000-0000-000000000000", | ||
"notificationId": 2, | ||
"id": "af07be1b-f3ad-44c8-a7f1-c4835f2df06b", | ||
"eventType": "ms.vss-code.git-pullrequest-comment-event", | ||
"publisherId": "tfs", | ||
"message": { | ||
"text": "Jamal Hartnett has edited a pull request comment", | ||
"html": "Jamal Hartnett has <a href=\"https://fabrikam.visualstudio.com/DefaultCollection/_git/Fabrikam/pullrequest/1?discussionId=5\">edited</a> a pull request comment", | ||
"markdown": "Jamal Hartnett has [edited](https://fabrikam.visualstudio.com/DefaultCollection/_git/Fabrikam/pullrequest/1?discussionId=5) a pull request comment" | ||
}, | ||
"detailedMessage": { | ||
"text": "Jamal Hartnett has edited a pull request comment\r\nThis is my comment.\r\n", | ||
"html": "Jamal Hartnett has <a href=\"https://fabrikam.visualstudio.com/DefaultCollection/_git/Fabrikam/pullrequest/1?discussionId=5\">edited</a> a pull request comment<p>This is my comment.</p>", | ||
"markdown": "Jamal Hartnett has [edited](https://fabrikam.visualstudio.com/DefaultCollection/_git/Fabrikam/pullrequest/1?discussionId=5) a pull request comment\r\nThis is my comment.\r\n" | ||
}, | ||
"resource": { | ||
"comment": { | ||
"id": 2, | ||
"parentCommentId": 1, | ||
"author": { | ||
"displayName": "Jamal Hartnett", | ||
"url": "https://fabrikam.vssps.visualstudio.com/_apis/Identities/54d125f7-69f7-4191-904f-c5b96b6261c8", | ||
"id": "54d125f7-69f7-4191-904f-c5b96b6261c8", | ||
"uniqueName": "fabrikamfiber4@hotmail.com", | ||
"imageUrl": "https://fabrikam.visualstudio.com/DefaultCollection/_api/_common/identityImage?id=54d125f7-69f7-4191-904f-c5b96b6261c8" | ||
}, | ||
"content": "This is my comment.", | ||
"publishedDate": "2014-06-17T16:55:46.589889Z", | ||
"lastUpdatedDate": "2014-06-17T16:58:33.123889Z", | ||
"lastContentUpdatedDate": "2014-06-17T16:58:33.123889Z", | ||
"commentType": "text", | ||
"_links": { | ||
"self": { | ||
"href": "https://fabrikam.visualstudio.com/DefaultCollection/_apis/git/repositories/4bc14d40-c903-45e2-872e-0462c7748079/pullRequests/1/threads/5/comments/2" | ||
}, | ||
"repository": { | ||
"href": "http://joscol2/DefaultCollection/ebed510c-62eb-474b-965f-fd151ebb82e4/_apis/git/repositories/4bc14d40-c903-45e2-872e-0462c7748079" | ||
}, | ||
"threads": { | ||
"href": "https://fabrikam.visualstudio.com/DefaultCollection/_apis/git/repositories/4bc14d40-c903-45e2-872e-0462c7748079/pullRequests/1/threads/5" | ||
} | ||
} | ||
}, | ||
"pullRequest": { | ||
"repository": { | ||
"id": "4bc14d40-c903-45e2-872e-0462c7748079", | ||
"name": "Fabrikam", | ||
"url": "https://fabrikam.visualstudio.com/DefaultCollection/_apis/git/repositories/4bc14d40-c903-45e2-872e-0462c7748079", | ||
"project": { | ||
"id": "6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c", | ||
"name": "Fabrikam", | ||
"url": "https://fabrikam.visualstudio.com/DefaultCollection/_apis/projects/6ce954b1-ce1f-45d1-b94d-e6bf2464ba2c", | ||
"state": "wellFormed", | ||
"visibility": "unchanged", | ||
"lastUpdateTime": "0001-01-01T00:00:00" | ||
}, | ||
"sshUrl": "git@ssh.dev.azure.com:v3/fabrikam/DefaultCollection/Fabrikam", | ||
"webUrl": "https://dev.azure.com/fabrikam/DefaultCollection/_git/Fabrikam", | ||
"remoteUrl": "https://fabrikam.visualstudio.com/DefaultCollection/_git/Fabrikam" | ||
}, | ||
"pullRequestId": 1, | ||
"status": "active", | ||
"createdBy": { | ||
"displayName": "Jamal Hartnett", | ||
"url": "https://fabrikam.vssps.visualstudio.com/_apis/Identities/54d125f7-69f7-4191-904f-c5b96b6261c8", | ||
"id": "54d125f7-69f7-4191-904f-c5b96b6261c8", | ||
"uniqueName": "fabrikamfiber4@hotmail.com", | ||
"imageUrl": "https://fabrikam.visualstudio.com/DefaultCollection/_api/_common/identityImage?id=54d125f7-69f7-4191-904f-c5b96b6261c8" | ||
}, | ||
"creationDate": "2014-06-17T16:55:46.589889Z", | ||
"title": "my first pull request", | ||
"description": " - test2\r\n", | ||
"sourceRefName": "refs/heads/mytopic", | ||
"targetRefName": "refs/heads/master", | ||
"mergeStatus": "succeeded", | ||
"mergeId": "a10bb228-6ba6-4362-abd7-49ea21333dbd", | ||
"lastMergeSourceCommit": { | ||
"commitId": "53d54ac915144006c2c9e90d2c7d3880920db49c", | ||
"url": "https://fabrikam.visualstudio.com/DefaultCollection/_apis/git/repositories/4bc14d40-c903-45e2-872e-0462c7748079/commits/53d54ac915144006c2c9e90d2c7d3880920db49c" | ||
}, | ||
"lastMergeTargetCommit": { | ||
"commitId": "a511f535b1ea495ee0c903badb68fbc83772c882", | ||
"url": "https://fabrikam.visualstudio.com/DefaultCollection/_apis/git/repositories/4bc14d40-c903-45e2-872e-0462c7748079/commits/a511f535b1ea495ee0c903badb68fbc83772c882" | ||
}, | ||
"lastMergeCommit": { | ||
"commitId": "eef717f69257a6333f221566c1c987dc94cc0d72", | ||
"url": "https://fabrikam.visualstudio.com/DefaultCollection/_apis/git/repositories/4bc14d40-c903-45e2-872e-0462c7748079/commits/eef717f69257a6333f221566c1c987dc94cc0d72" | ||
}, | ||
"reviewers": [ | ||
{ | ||
"reviewerUrl": null, | ||
"vote": 0, | ||
"displayName": "[Mobile]\\Mobile Team", | ||
"url": "https://fabrikam.vssps.visualstudio.com/_apis/Identities/2ea2d095-48f9-4cd6-9966-62f6f574096c", | ||
"id": "2ea2d095-48f9-4cd6-9966-62f6f574096c", | ||
"uniqueName": "vstfs:///Classification/TeamProject/f0811a3b-8c8a-4e43-a3bf-9a049b4835bd\\Mobile Team", | ||
"imageUrl": "https://fabrikam.visualstudio.com/DefaultCollection/_api/_common/identityImage?id=2ea2d095-48f9-4cd6-9966-62f6f574096c", | ||
"isContainer": true | ||
} | ||
], | ||
"commits": [ | ||
{ | ||
"commitId": "53d54ac915144006c2c9e90d2c7d3880920db49c", | ||
"url": "https://fabrikam.visualstudio.com/DefaultCollection/_apis/git/repositories/4bc14d40-c903-45e2-872e-0462c7748079/commits/53d54ac915144006c2c9e90d2c7d3880920db49c" | ||
} | ||
], | ||
"url": "https://fabrikam.visualstudio.com/DefaultCollection/_apis/git/repositories/4bc14d40-c903-45e2-872e-0462c7748079/pullRequests/1", | ||
"_links": { | ||
"web": { | ||
"href": "https://fabrikam.visualstudio.com/DefaultCollection/_git/Fabrikam/pullrequest/1#view=discussion" | ||
}, | ||
"statuses": { | ||
"href": "https://fabrikam.visualstudio.com/DefaultCollection/_apis/git/repositories/4bc14d40-c903-45e2-872e-0462c7748079/pullRequests/1/statuses" | ||
} | ||
} | ||
} | ||
}, | ||
"resourceVersion": "2.0", | ||
"resourceContainers": { | ||
"collection": { | ||
"id": "c12d0eb8-e382-443b-9f9c-c52cba5014c2" | ||
}, | ||
"account": { | ||
"id": "f844ec47-a9db-4511-8281-8b63f4eaf94e" | ||
}, | ||
"project": { | ||
"id": "be9b3917-87e6-42a4-a549-2bc06a7a878f" | ||
} | ||
}, | ||
"createdDate": "2022-06-21T13:03:20.480894Z" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
{ | ||
"Action": "edited", | ||
"Repo": { | ||
"ID": "4bc14d40-c903-45e2-872e-0462c7748079", | ||
"Namespace": "Fabrikam", | ||
"Name": "Fabrikam", | ||
"Perm": null, | ||
"Branch": "mytopic", | ||
"Archived": false, | ||
"Private": false, | ||
"Visibility": 0, | ||
"Clone": "https://dev.azure.com/fabrikam/DefaultCollection/_git/Fabrikam", | ||
"CloneSSH": "git@ssh.dev.azure.com:v3/fabrikam/DefaultCollection/Fabrikam", | ||
"Link": "https://dev.azure.com/fabrikam/DefaultCollection/_git/Fabrikam", | ||
"Created": "0001-01-01T00:00:00Z", | ||
"Updated": "0001-01-01T00:00:00Z" | ||
}, | ||
"Issue": { | ||
"Number": 1, | ||
"Title": "my first pull request", | ||
"Body": " - test2\r\n", | ||
"Link": "https://fabrikam.visualstudio.com/DefaultCollection/_apis/git/repositories/4bc14d40-c903-45e2-872e-0462c7748079/pullRequests/1", | ||
"Author": { | ||
"Login": "Jamal Hartnett", | ||
"Name": "Jamal Hartnett", | ||
"Email": "fabrikamfiber4@hotmail.com", | ||
"Avatar": "https://fabrikam.visualstudio.com/DefaultCollection/_api/_common/identityImage?id=54d125f7-69f7-4191-904f-c5b96b6261c8", | ||
"Created": "0001-01-01T00:00:00Z", | ||
"Updated": "0001-01-01T00:00:00Z" | ||
}, | ||
"PullRequest": { | ||
"Number": 1, | ||
"Title": "my first pull request", | ||
"Body": " - test2\r\n", | ||
"Sha": "53d54ac915144006c2c9e90d2c7d3880920db49c", | ||
"Ref": "refs/heads/mytopic", | ||
"Source": "mytopic", | ||
"Target": "master", | ||
"Fork": "", | ||
"Link": "https://fabrikam.visualstudio.com/DefaultCollection/_apis/git/repositories/4bc14d40-c903-45e2-872e-0462c7748079/pullRequests/1", | ||
"Diff": "", | ||
"Closed": false, | ||
"Merged": false, | ||
"Base": { | ||
"Name": "", | ||
"Path": "", | ||
"Sha": "" | ||
}, | ||
"Head": { | ||
"Name": "", | ||
"Path": "", | ||
"Sha": "" | ||
}, | ||
"Author": { | ||
"Login": "Jamal Hartnett", | ||
"Name": "Jamal Hartnett", | ||
"Email": "fabrikamfiber4@hotmail.com", | ||
"Avatar": "https://fabrikam.visualstudio.com/DefaultCollection/_api/_common/identityImage?id=54d125f7-69f7-4191-904f-c5b96b6261c8", | ||
"Created": "0001-01-01T00:00:00Z", | ||
"Updated": "0001-01-01T00:00:00Z" | ||
}, | ||
"Created": "2014-06-17T16:55:46.589889Z", | ||
"Updated": "0001-01-01T00:00:00Z", | ||
"Labels": null | ||
}, | ||
"Created": "2014-06-17T16:55:46.589889Z" | ||
}, | ||
"Comment": { | ||
"ID": 2, | ||
"Body": "This is my comment.", | ||
"Author": { | ||
"Login": "54d125f7-69f7-4191-904f-c5b96b6261c8", | ||
"Name": "Jamal Hartnett", | ||
"Email": "fabrikamfiber4@hotmail.com", | ||
"Created": "0001-01-01T00:00:00Z", | ||
"Updated": "0001-01-01T00:00:00Z" | ||
}, | ||
"Created": "2014-06-17T16:55:46.589889Z", | ||
"Updated": "2014-06-17T16:58:33.123889Z" | ||
}, | ||
"Sender": { | ||
"Login": "54d125f7-69f7-4191-904f-c5b96b6261c8", | ||
"Name": "Jamal Hartnett", | ||
"Email": "fabrikamfiber4@hotmail.com", | ||
"Created": "0001-01-01T00:00:00Z", | ||
"Updated": "0001-01-01T00:00:00Z" | ||
} | ||
} |
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
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