Skip to content
This repository has been archived by the owner on Jan 18, 2021. It is now read-only.

Fixes problem with automatic merges #647

Merged
merged 3 commits into from Feb 28, 2018
Merged

Fixes problem with automatic merges #647

merged 3 commits into from Feb 28, 2018

Conversation

epeee
Copy link
Contributor

@epeee epeee commented Feb 25, 2018

fixes #646

@epeee epeee changed the title WIP: Refactor merge pr's automatically Refactor merge pr's automatically Feb 25, 2018
@epeee
Copy link
Contributor Author

epeee commented Feb 25, 2018

I just merged mockito/shipkit-example#170 using the rest api also used in this pr and it did work 😄

Copy link
Member

@mockitoguy mockitoguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking forward to automatic merges! :)

@@ -50,7 +50,7 @@ public void mergePullRequest(MergePullRequestTask task, GitHubApi gitHubApi, Git
}

LOG.lifecycle("All checks passed! Merging pull request in repository '{}' between base = '{}' and head = '{}'.", task.getUpstreamRepositoryName(), task.getBaseBranch(), headBranch);
gitHubApi.post("/repos/" + task.getUpstreamRepositoryName() + "/merges", body);
gitHubApi.post("/repos/" + task.getUpstreamRepositoryName() + "/pulls/" + task.getPullRequestNumber() + "/merge", body);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nice change. Thank you!


import spock.lang.Specification

class BranchUtilsTest extends Specification {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! Thank you for adding missing test.

@mockitoguy
Copy link
Member

Merging. Nice change!

@mockitoguy mockitoguy changed the title Refactor merge pr's automatically Fixes problem with automatic merges Feb 28, 2018
@mockitoguy mockitoguy merged commit 1dd08ac into master Feb 28, 2018
@epeee epeee deleted the ep branch March 1, 2018 06:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automatically merging pr's is failing while calling github rest api
2 participants