Skip to content

Commit

Permalink
fix: use correct command
Browse files Browse the repository at this point in the history
Previously I used the merge branch command, this command requires different parameters and failed. By using the pull request merge action we fixed the behaviour.
  • Loading branch information
Joris Conijn committed Feb 5, 2022
1 parent bee8914 commit 13d641b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pull_request_codecommit/aws/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def merge_pull_request(self, repository: str, pull_request_id: int) -> dict:
response = self.__execute(
[
"codecommit",
"merge-branches-by-fast-forward",
"merge-pull-request-by-fast-forward",
"--pull-request-id",
str(pull_request_id),
"--repository-name",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def aws_client_execute_side_effect(parameters, stdout):
if "create-pull-request" in parameters:
data = {"pullRequest": {"pullRequestId": 1}}

elif "merge-branches-by-fast-forward" in parameters:
elif "merge-pull-request-by-fast-forward" in parameters:
data = {"pullRequest": {"pullRequestStatus": "CLOSED"}}

mock_stdout.stdout = bytes(json.dumps(data), "utf-8")
Expand Down

0 comments on commit 13d641b

Please sign in to comment.