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

Auto-merge approved RFCs #198

Open
Centril opened this issue Apr 21, 2018 · 2 comments
Open

Auto-merge approved RFCs #198

Centril opened this issue Apr 21, 2018 · 2 comments

Comments

@Centril
Copy link
Contributor

Centril commented Apr 21, 2018

Opening an issue per discussion at #197 (diff).

To save the rfc-pushers some time, it would be nice to auto-merge RFCs that are FFCPed (finished-final-comment-period).

This is a complicated process which involves these steps executed (by a human right now..) in order:

  1. Find out which team(s) the RFC falls under.
  2. Fetch RFC pull number (trivial).
  3. Start a tracking issue using a standard template defined here. One example issue: Tracking issue for RFC 2046, label-break-value rust#48594
    1. Apply the labels: C-tracking-issue, B-RFC-approved
    2. For each team the RFC falls under, apply a label T-team.
    3. Substitute mentoring instructions based on team.
      • For T-lang, mentoring instructions come from T-compiler.
    4. Find the PR title of the RFC and substitute XXX in This is a tracking issue for the RFC "XXX" with the title.
      • But first apply some heuristics removing prefixes such as RFC: (case insensitive). This also applies to similar suffixes.
    5. Set the issue title to Tracking issue for RFC <number>, <title> where <title> is dependent on step 3.4.
    6. Find all unresolved questions from the RFC and add them to the tracking issue text.
      • This will be a bit difficult and will require some heuristics based on common formatting in RFCs.
  4. Fetch the issue number of the newly created tracking issue.
  5. Merge the PR into master
  6. Add a commit substituting 0000 in the file name of the committed file with <number>.
    • The commit should be named RFC <number>.
    • It should also adjust the links to the tracking issue and the RFC PR.
  7. Add a comment on the PR saying:
    **Huzzah!** This RFC is **merged**!
    
    Tracking issue: <issue_link>
  8. Find the [Rendered] link in the PR summary / original post and change the link to the new location of the file (in the master branch).
    • Also add a link to the tracking issue.
    • This will also require some heuristics.

This procedure has multiple points of failure for a bot. If a failure does happen, the bot should stop immediately and post a comment on the RFC saying "automated merge procedure failed, please merge manually."

Who will implement this? I will (at some point).

@dwijnand
Copy link
Member

dwijnand commented Feb 5, 2019

Note that "merge doesn't always mean merge": rust-lang/rust#56138 (comment) 😉

@Centril
Copy link
Contributor Author

Centril commented Feb 14, 2019

@dwijnand Yea, that's why this should only apply to RFCs and not rust-lang/rust PRs ;) We need to post-process the PRs anyways for merge conflicts, other small fixes, etc.

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

No branches or pull requests

2 participants