-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Autoplan for Bitbucket Server on pull request **update** #198
Comments
+1 |
|
@miked0004 yes please, that should be a lot easier to fix. If you can pull the payload and paste it in a gist that would be very helpful too. |
@lkysow do you still need a gist of the event {
"eventKey": "repo:refs_changed",
"date": "2020-01-17T23:28:09-0800",
"actor": {
"name": "admin",
"emailAddress": "[email protected]",
"id": 2557,
"displayName": "Administator",
"active": true,
"slug": "admin",
"type": "NORMAL",
"links": {
"self": [
{
"href": "https://example.com/stash/users/admin"
}
]
}
},
"repository": {
"slug": "todo-app-terraform",
"id": 1321,
"name": "todo-app-terraform",
"scmId": "git",
"state": "AVAILABLE",
"statusMessage": "Available",
"forkable": true,
"project": {
"key": "TF",
"id": 968,
"name": "terraform iac",
"description": "terraform iac repositories\r\n\r\n{{platform}}-{{provider}}-{{name}}\r\n\r\nie. `terraform-aws-vpc`",
"public": false,
"type": "NORMAL",
"links": {
"self": [
{
"href": "https://example.com/stash/projects/tf"
}
]
}
},
"public": false,
"links": {
"clone": [
{
"href": "ssh://[email protected]/tf/todo-app-terraform.git",
"name": "ssh"
},
{
"href": "https://example.com/stash/scm/tf/todo-app-terraform.git",
"name": "http"
}
],
"self": [
{
"href": "https://example.com/stash/projects/tf/repos/todo-app-terraform/browse"
}
]
}
},
"changes": [
{
"ref": {
"id": "refs/heads/TF-162/feature/keep-history",
"displayId": "TF-162/feature/keep-history",
"type": "BRANCH"
},
"refId": "refs/heads/TF-162/feature/keep-history",
"fromHash": "6938f70d438cd8347b272af6e6a8367ed4f70a90",
"toHash": "18a1bb9180abba73a0f1bf631ace238779feaff0",
"type": "UPDATE"
}
]
} |
@kevinneufeld I was referring to the PR:declined payload but thanks! |
+1 for this issue
log message:
There is some inconsistency in docs which messed me up. ddbf967#diff-c3959bd6615407d43d9333fc4daa10006c73dcf006339e61286da34cec197c3bR90
Push refers to repo:refs_changed which is not supported.
|
Imho, can be closed |
Sounds good, I am closing this issue now. Thanks @kuzm1ch! |
The current implementation of Bitbucket Server won't run plan automatically when the pull request is updated. This is because Bitbucket Server doesn't send its
pr:modified
event when a new commit is pushed to the pull request. It only sends this event when the title of the PR is edited or something like that.We could instead subscribe to the
repo:refs_changed
repository event which would tell us when a branch was updated. We'd then look at what pull requests we have outstanding by iterating through the filesystem and then seeing if those pull requests are for the same branch at which point we could trigger the autoplan.The text was updated successfully, but these errors were encountered: