opened 02:14AM - 21 Apr 18 UTC
Opening an issue per discussion at https://github.com/anp/rfcbot-rs/pull/197#dis… cussion-diff-183131428R448.
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](https://forge.rust-lang.org/rfc-merge-procedure.html). One example issue: https://github.com/rust-lang/rust/issues/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:
```markdown
**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).
I will say that this is pretty easy already especially if you're actually taking the time to write a new RFC; anyone who does so should at the very least search through old proposals. One way to improve this is to label all the closed RFCs as well as open and closed issues properly. I've only labeled the merged ones but this took a lot of time and I'd appreciate the help with the rest.