Skip to content
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

Merge blacklist PRs manually using merge=union #284

Merged
merged 5 commits into from
Nov 26, 2017
Merged

Merge blacklist PRs manually using merge=union #284

merged 5 commits into from
Nov 26, 2017

Conversation

quartata
Copy link
Member

@quartata quartata commented Nov 25, 2017

This prevents the usual merge conflicts created when another blacklist PR is merged first.

@quartata
Copy link
Member Author

This closes Charcoal-SE/SmokeDetector#776.

`git checkout master; git pull origin master`
`git fetch origin #{ref}`
`git merge origin/#{ref} --no-ff -m 'Merge pull request ##{pr_num} from Charcoal-SE/#{ref} --autopull'`
`git push origin master`
Copy link
Member

Choose a reason for hiding this comment

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

Is there an Octokit equivalent for each of these commands?

Copy link
Member Author

@quartata quartata Nov 25, 2017

Choose a reason for hiding this comment

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

No, sadly. The Github API does not respect the merge=union Git attribute when performing merges (otherwise I could just drop a .gitattributes in the SmokeDetector repo).

Copy link
Member Author

Choose a reason for hiding this comment

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

@quartata
Copy link
Member Author

quartata commented Nov 25, 2017

@ArtOfCode- Is there an AppConfig entry containing the email for the Metasmoke Github account? All I see is AppConfig['github']['username'] which I assume is just metasmoke

@ArtOfCode-
Copy link
Member

That'll be the email, since it's used to log in


`git checkout master; git pull origin master`
`git fetch origin #{ref}`
`git merge origin/#{ref} --no-ff -m 'Merge pull request ##{pr_num} from Charcoal-SE/#{ref} --autopull'`
Copy link
Member

@Undo1 Undo1 Nov 26, 2017

Choose a reason for hiding this comment

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

String interpolation here makes me nervous. Is it at all possible to parameterize these in some way? If the GH secret gets out, this could be a direct path to full shell access. Otherwise, looks great.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll change it to a system call (which also won't capture stdout as a bonus)

@@ -213,12 +213,32 @@ def pullapprove_merge_hook
return
end

unless Dir.exist?('SmokeDetector')
`git clone https://github.com/Charcoal-SE/SmokeDetector`
Copy link
Member

Choose a reason for hiding this comment

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

We'll want to switch this over to SSH

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch

@Undo1 Undo1 merged commit fe2c8b8 into Charcoal-SE:master Nov 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants