feat: Add pr_comment webhook for harness (#280)
parent
6982ab89b5
commit
a5db7f41d8
@ -0,0 +1,63 @@
|
||||
{
|
||||
"trigger": "pullreq_comment_created",
|
||||
"repo": {
|
||||
"id": 18,
|
||||
"path": "asd/demo",
|
||||
"uid": "demo",
|
||||
"default_branch": "main",
|
||||
"git_url": "http://localhost:3000/git/asd/demo.git"
|
||||
},
|
||||
"principal": {
|
||||
"id": 3,
|
||||
"uid": "admin",
|
||||
"display_name": "Administrator",
|
||||
"email": "admin@gitness.io",
|
||||
"type": "user",
|
||||
"created": 1696332021613,
|
||||
"updated": 1696332021613
|
||||
},
|
||||
"pull_req": {
|
||||
"number": 2,
|
||||
"state": "open",
|
||||
"is_draft": false,
|
||||
"title": "Update test.txt",
|
||||
"source_repo_id": 18,
|
||||
"source_branch": "pr2",
|
||||
"target_repo_id": 18,
|
||||
"target_branch": "main",
|
||||
"merge_strategy": null,
|
||||
"author": {
|
||||
"id": 8,
|
||||
"uid": "0osgWsTZRsSZ8RWfjLRkEg",
|
||||
"display_name": "Admin",
|
||||
"email": "admin@harness.io",
|
||||
"type": "user",
|
||||
"created": 1675390885380,
|
||||
"updated": 1675390885380
|
||||
}
|
||||
},
|
||||
"target_ref": {
|
||||
"name": "refs/heads/main",
|
||||
"repo": {
|
||||
"id": 18,
|
||||
"path": "asd/demo",
|
||||
"uid": "demo",
|
||||
"default_branch": "main",
|
||||
"git_url": "http://localhost:3000/git/asd/demo.git"
|
||||
}
|
||||
},
|
||||
"ref": {
|
||||
"name": "refs/heads/pr2",
|
||||
"repo": {
|
||||
"id": 18,
|
||||
"path": "asd/demo",
|
||||
"uid": "demo",
|
||||
"default_branch": "main",
|
||||
"git_url": "http://localhost:3000/git/asd/demo.git"
|
||||
}
|
||||
},
|
||||
"comment": {
|
||||
"id": 1,
|
||||
"text": "pr comment"
|
||||
}
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
{
|
||||
"Repo": {
|
||||
"ID": "18",
|
||||
"Namespace": "",
|
||||
"Name": "demo",
|
||||
"Branch": "main",
|
||||
"Private": false,
|
||||
"Clone": "http://localhost:3000/git/asd/demo.git",
|
||||
"CloneSSH": "",
|
||||
"Link": "http://localhost:3000/git/asd/demo.git",
|
||||
"Created": "0001-01-01T00:00:00Z",
|
||||
"Updated": "0001-01-01T00:00:00Z"
|
||||
},
|
||||
"PullRequest": {
|
||||
"Number": 2,
|
||||
"Title": "Update test.txt",
|
||||
"Body": "",
|
||||
"Sha": "",
|
||||
"Ref": "refs/heads/pr2",
|
||||
"Source": "pr2",
|
||||
"Target": "main",
|
||||
"Fork": "fork",
|
||||
"Link": "http://localhost:3000/git/asd/demo.git",
|
||||
"Closed": false,
|
||||
"Merged": false,
|
||||
"Author": {
|
||||
"ID": "0osgWsTZRsSZ8RWfjLRkEg",
|
||||
"Login": "0osgWsTZRsSZ8RWfjLRkEg",
|
||||
"Name": "Admin",
|
||||
"Email": "admin@harness.io",
|
||||
"Avatar": "",
|
||||
"Created": "2023-02-02T18:21:25.38-08:00",
|
||||
"Updated": "2023-02-02T18:21:25.38-08:00"
|
||||
},
|
||||
"Created": "0001-01-01T00:00:00Z",
|
||||
"Updated": "0001-01-01T00:00:00Z"
|
||||
},
|
||||
"Comment": {
|
||||
"ID": 1,
|
||||
"Body": "pr comment"
|
||||
},
|
||||
"Sender": {
|
||||
"ID": "admin",
|
||||
"Login": "admin",
|
||||
"Name": "Administrator",
|
||||
"Email": "admin@gitness.io",
|
||||
"Avatar": "",
|
||||
"Created": "2023-10-03T04:20:21.613-07:00",
|
||||
"Updated": "2023-10-03T04:20:21.613-07:00"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue