-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Require approval from someone other than PR author
In Bitbucket cloud, the pull request author can approve their own pull request. Ignore this approval. Fixes #201
- Loading branch information
Showing
8 changed files
with
728 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
166 changes: 166 additions & 0 deletions
166
server/events/vcs/bitbucketcloud/testdata/pull-approved-by-author.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,166 @@ | ||
{ | ||
"type": "pullrequest", | ||
"description": "main.tf edited online with Bitbucket", | ||
"links": { | ||
"decline": { | ||
"href": "https://api.bitbucket.org/2.0/repositories/lkysow/atlantis-example/pullrequests/5/decline" | ||
}, | ||
"commits": { | ||
"href": "https://api.bitbucket.org/2.0/repositories/lkysow/atlantis-example/pullrequests/5/commits" | ||
}, | ||
"self": { | ||
"href": "https://api.bitbucket.org/2.0/repositories/lkysow/atlantis-example/pullrequests/5" | ||
}, | ||
"comments": { | ||
"href": "https://api.bitbucket.org/2.0/repositories/lkysow/atlantis-example/pullrequests/5/comments" | ||
}, | ||
"merge": { | ||
"href": "https://api.bitbucket.org/2.0/repositories/lkysow/atlantis-example/pullrequests/5/merge" | ||
}, | ||
"html": { | ||
"href": "https://bitbucket.org/lkysow/atlantis-example/pull-requests/5" | ||
}, | ||
"activity": { | ||
"href": "https://api.bitbucket.org/2.0/repositories/lkysow/atlantis-example/pullrequests/5/activity" | ||
}, | ||
"diff": { | ||
"href": "https://api.bitbucket.org/2.0/repositories/lkysow/atlantis-example/pullrequests/5/diff" | ||
}, | ||
"approve": { | ||
"href": "https://api.bitbucket.org/2.0/repositories/lkysow/atlantis-example/pullrequests/5/approve" | ||
}, | ||
"statuses": { | ||
"href": "https://api.bitbucket.org/2.0/repositories/lkysow/atlantis-example/pullrequests/5/statuses" | ||
} | ||
}, | ||
"title": "main.tf edited online with Bitbucket", | ||
"close_source_branch": true, | ||
"reviewers": [], | ||
"id": 5, | ||
"destination": { | ||
"commit": { | ||
"hash": "fe607a7f5172", | ||
"type": "commit", | ||
"links": { | ||
"self": { | ||
"href": "https://api.bitbucket.org/2.0/repositories/lkysow/atlantis-example/commit/fe607a7f5172" | ||
}, | ||
"html": { | ||
"href": "https://bitbucket.org/lkysow/atlantis-example/commits/fe607a7f5172" | ||
} | ||
} | ||
}, | ||
"repository": { | ||
"links": { | ||
"self": { | ||
"href": "https://api.bitbucket.org/2.0/repositories/lkysow/atlantis-example" | ||
}, | ||
"html": { | ||
"href": "https://bitbucket.org/lkysow/atlantis-example" | ||
}, | ||
"avatar": { | ||
"href": "https://bytebucket.org/ravatar/%7B94189367-116b-436a-9f77-2314b97a6067%7D?ts=default" | ||
} | ||
}, | ||
"type": "repository", | ||
"name": "atlantis-example", | ||
"full_name": "lkysow/atlantis-example", | ||
"uuid": "{94189367-116b-436a-9f77-2314b97a6067}" | ||
}, | ||
"branch": { | ||
"name": "master" | ||
} | ||
}, | ||
"created_on": "2018-07-25T12:23:21.100810+00:00", | ||
"summary": { | ||
"raw": "main.tf edited online with Bitbucket", | ||
"markup": "markdown", | ||
"html": "<p>main.tf edited online with Bitbucket</p>", | ||
"type": "rendered" | ||
}, | ||
"source": { | ||
"commit": { | ||
"hash": "3428957ade18", | ||
"type": "commit", | ||
"links": { | ||
"self": { | ||
"href": "https://api.bitbucket.org/2.0/repositories/lkysow/atlantis-example/commit/3428957ade18" | ||
}, | ||
"html": { | ||
"href": "https://bitbucket.org/lkysow/atlantis-example/commits/3428957ade18" | ||
} | ||
} | ||
}, | ||
"repository": { | ||
"links": { | ||
"self": { | ||
"href": "https://api.bitbucket.org/2.0/repositories/lkysow/atlantis-example" | ||
}, | ||
"html": { | ||
"href": "https://bitbucket.org/lkysow/atlantis-example" | ||
}, | ||
"avatar": { | ||
"href": "https://bytebucket.org/ravatar/%7B94189367-116b-436a-9f77-2314b97a6067%7D?ts=default" | ||
} | ||
}, | ||
"type": "repository", | ||
"name": "atlantis-example", | ||
"full_name": "lkysow/atlantis-example", | ||
"uuid": "{94189367-116b-436a-9f77-2314b97a6067}" | ||
}, | ||
"branch": { | ||
"name": "lkysow/maintf-edited-online-with-bitbucket-1532521398289" | ||
} | ||
}, | ||
"comment_count": 3, | ||
"state": "OPEN", | ||
"task_count": 0, | ||
"participants": [ | ||
{ | ||
"role": "PARTICIPANT", | ||
"participated_on": "2018-07-28T00:06:42.255492+00:00", | ||
"type": "participant", | ||
"approved": true, | ||
"user": { | ||
"username": "author", | ||
"display_name": "Luke", | ||
"account_id": "557058:dc3817de-68b5-45cd-b81c-5c39d2560090", | ||
"links": { | ||
"self": { | ||
"href": "https://api.bitbucket.org/2.0/users/lkysow" | ||
}, | ||
"html": { | ||
"href": "https://bitbucket.org/lkysow/" | ||
}, | ||
"avatar": { | ||
"href": "https://bitbucket.org/account/lkysow/avatar/" | ||
} | ||
}, | ||
"type": "user", | ||
"uuid": "{bf34a99b-8a11-452c-8fbc-bdffc340e584}" | ||
} | ||
} | ||
], | ||
"reason": "", | ||
"updated_on": "2018-07-28T00:06:42.257659+00:00", | ||
"author": { | ||
"username": "lkysow", | ||
"display_name": "Luke", | ||
"account_id": "557058:dc3817de-68b5-45cd-b81c-5c39d2560090", | ||
"links": { | ||
"self": { | ||
"href": "https://api.bitbucket.org/2.0/users/lkysow" | ||
}, | ||
"html": { | ||
"href": "https://bitbucket.org/lkysow/" | ||
}, | ||
"avatar": { | ||
"href": "https://bitbucket.org/account/lkysow/avatar/" | ||
} | ||
}, | ||
"type": "user", | ||
"uuid": "{bf34a99b-8a11-452c-8fbc-bdffc340e584}" | ||
}, | ||
"merge_commit": null, | ||
"closed_by": null | ||
} |
Oops, something went wrong.