Skip to content

Fix #49 - set auto-merge PRs on the priority queue at the Auto-Tester #50

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

Closed
wants to merge 1 commit into from

Conversation

wilzbach
Copy link
Member

As there is no API for the auto-tester, here's a proposal to login as user, send the AutoMerge command to the auto-tester and thus prioritize the PR.
However, this requires one to be logged in at GitHub, so this PR first logs in at Github and then via OAuth at the auto-tester. As for both GitHub and the auto-tester CSFR protection exists, the authenticity tokens need to scraped from the response. For convenience (and as Vibe.d doesn't handle client-side cookies), I used the excellent requests library.

The biggest downside to this approach is that it requires the "password" of the dlang-bot to be set as Heroku environment variable, but I don't know of any other way to do so without.

The following needs to be done as well:

  • login with dlang-bot at the auto-tester and approve the OAuth confirmation dialog
  • approve dlang-bot for the auto-tester (requires to make a dummy PR, so that it can be approved)
  • optionally once this is working: disable GH API merge at the auto-tester, s.t. it doesn't conflict with the dlang-bot (for example a merge triggered by the auto-tester wouldn't include the "merged-on-behalf-of" comment)

As this is experimental (and a bit hard to test without messing with real PRs), I set the entire method to "soft-fail".

CC @braddr

@braddr
Copy link
Member

braddr commented Feb 17, 2017

This all sounds like a bad idea. Just stop setting my auto-testers auto-merge state and move that role over to dlang-bot. I can have the auto-tester recognize the github pull request tag to do the prioritization.

Does anything auto-remove that tag when pulls are changed? Something really should, imho.

@wilzbach
Copy link
Member Author

Does anything auto-remove that tag when pulls are changed? Something really should, imho.

Yup.

https://github.com/dlang-bots/dlang-bot/blob/master/source/dlangbot/app.d#L184

In action:

dlang/phobos#5141

This all sounds like a bad idea. Just stop setting my auto-testers auto-merge state and move that role over to dlang-bot. I can have the auto-tester recognize the github pull request tag to do the prioritization.

Fair enough. That sounds a lot better :)
FYI there are two labels (auto-merge and auto-merge-squash).

Here's how the dlang-bot searches for these labels: https://github.com/dlang-bots/dlang-bot/blob/master/source/dlangbot/github.d#L268

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants