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

Human friendly incantations + Auto Closing/Postponing RFCs + More labels #197

Merged
merged 7 commits into from Apr 30, 2018

Conversation

3 participants
@Centril
Collaborator

Centril commented Apr 20, 2018

This PR aims to fix:

  • #193 by adding aliases and fault tolerant incantations (and a whole lot more in that direction)
  • #102 (finished-final-comment-period + labels for disposition)

In addition, the PR improves the FCP-completed comment and also auto-closes FCP-completed RFCs with a disposition to close / postponed and applies those labels when doing so.

I haven't had time to test this on any repository, so please double check this logic =)

I also haven't added the new labels to the rfcs or rust repos. I'll do that before / if we merge this PR.
In total, these labels are added:

  • finished-final-comment-period
  • disposition-close
  • disposition-merge
  • disposition-postpone
  • closed

The postponed label already exists for the rfcs repo.

@Centril

This comment has been minimized.

Show comment
Hide comment
@Centril

Centril Apr 20, 2018

Collaborator

Hmm... The error arises from failing to compile diesel_cli v1.2.0.

Collaborator

Centril commented Apr 20, 2018

Hmm... The error arises from failing to compile diesel_cli v1.2.0.

@Centril

This comment has been minimized.

Show comment
Hide comment
@Centril

Centril Apr 20, 2018

Collaborator

Update: I updated the lockfile & bumped the nightly version to 2018-04-19; this seems to have fixed things.

Collaborator

Centril commented Apr 20, 2018

Update: I updated the lockfile & bumped the nightly version to 2018-04-19; this seems to have fixed things.

@aturon

This comment has been minimized.

Show comment
Hide comment
@aturon

aturon Apr 20, 2018

Collaborator

These changes look fantastic to me!

I only have one concern: right now, once an RFC is in FCP, adding a concern doesn't take it back out of FCP. That'd be nice to improve in general, and it becomes even more important if the bot is going to automatically close RFCs.

Collaborator

aturon commented Apr 20, 2018

These changes look fantastic to me!

I only have one concern: right now, once an RFC is in FCP, adding a concern doesn't take it back out of FCP. That'd be nice to improve in general, and it becomes even more important if the bot is going to automatically close RFCs.

@anp

wowowow

Thank you so much for this! Looking really great. I have some comments and a few requests. There are a couple of things I'd need to check to be sure on, but I'm short on time and will try to circle back soon. Really excited to see this land!

Show outdated Hide outdated src/github/nag.rs
Show outdated Hide outdated src/github/nag.rs
.first::<GitHubUser>(conn) {
Ok(i) => i,
Err(why) => {
error!("Unable to retrieve proposal initiator for proposal id {}: {:?}",

This comment has been minimized.

@anp

anp Apr 20, 2018

Owner

I need to double check the schema, but I'm pretty sure the database ensures this never happens and so this can probably be safely written as an expect.

@anp

anp Apr 20, 2018

Owner

I need to double check the schema, but I'm pretty sure the database ensures this never happens and so this can probably be safely written as an expect.

This comment has been minimized.

@Centril

Centril Apr 21, 2018

Collaborator

For now, to be on the safe side I'll keep the match. I'll change later if you are sure. :)

@Centril

Centril Apr 21, 2018

Collaborator

For now, to be on the safe side I'll keep the match. I'll change later if you are sure. :)

Show outdated Hide outdated src/github/nag.rs
Show outdated Hide outdated src/github/nag.rs
Show outdated Hide outdated src/github/nag.rs
},
}
fn is_rfc_repo(issue: &Issue) -> bool {

This comment has been minimized.

@anp

anp Apr 20, 2018

Owner

Can you make this a part of teams.toml (maybe rename to rfcbot.toml and move current fields under a top-level teams key)? It would be very nice to not regress progress towards #92.

@anp

anp Apr 20, 2018

Owner

Can you make this a part of teams.toml (maybe rename to rfcbot.toml and move current fields under a top-level teams key)? It would be very nice to not regress progress towards #92.

Show outdated Hide outdated src/github/nag.rs
match disposition {
FcpDisposition::Merge => {}
FcpDisposition::Close => {
msg.push_str("\n\nBy the power vested in me by Rust, I hereby close this RFC.");

This comment has been minimized.

@anp

anp Apr 20, 2018

Owner

Note that this won't be an accurate comment to post until rfcbot is given more permissions on the rust-lang org. Can we make this conditional on whether actually closing the issue succeeded? That might require a slight change to order of operations.

@anp

anp Apr 20, 2018

Owner

Note that this won't be an accurate comment to post until rfcbot is given more permissions on the rust-lang org. Can we make this conditional on whether actually closing the issue succeeded? That might require a slight change to order of operations.

This comment has been minimized.

@Centril

Centril Apr 21, 2018

Collaborator

Then you have to close the issue first which looks a bit weird imo. The current ordering feels natural as how a human would do it :) We should just give the bot these permissions imo.

@Centril

Centril Apr 21, 2018

Collaborator

Then you have to close the issue first which looks a bit weird imo. The current ordering feels natural as how a human would do it :) We should just give the bot these permissions imo.

@Centril

This comment has been minimized.

Show comment
Hide comment
@Centril

Centril Apr 21, 2018

Collaborator

Did some refactoring per @anp's suggestions.
I also took a crack at fixing @aturon's concern in 13c38fd.

The team.toml / rfcbot.toml bit isn't fixed yet tho; still working on that.

Collaborator

Centril commented Apr 21, 2018

Did some refactoring per @anp's suggestions.
I also took a crack at fixing @aturon's concern in 13c38fd.

The team.toml / rfcbot.toml bit isn't fixed yet tho; still working on that.

if proposal.fcp_start.is_some() {
// Update DB: FCP is not started anymore.
proposal.fcp_start = None;
match diesel::update(fcp_proposal.find(proposal.id))

This comment has been minimized.

@anp

anp Apr 21, 2018

Owner

Do you think the bot should comment when it's doing this? Could be confusing to do this without any visible status update?

cc @aturon

@anp

anp Apr 21, 2018

Owner

Do you think the bot should comment when it's doing this? Could be confusing to do this without any visible status update?

cc @aturon

This comment has been minimized.

@Centril

Centril Apr 22, 2018

Collaborator

My thinking is that:

let _ = issue.add_label(Label::PFCP);
issue.remove_label(Label::FCP);

serves as visible status update that the bot reacted to the concern :)

@Centril

Centril Apr 22, 2018

Collaborator

My thinking is that:

let _ = issue.add_label(Label::PFCP);
issue.remove_label(Label::FCP);

serves as visible status update that the bot reacted to the concern :)

This comment has been minimized.

@aturon

aturon Apr 28, 2018

Collaborator

Yeah I think that suffices, given that the concern registration is already a comment.

@aturon

aturon Apr 28, 2018

Collaborator

Yeah I think that suffices, given that the concern registration is already a comment.

@anp anp referenced this pull request Apr 25, 2018

Merged

new devtools team members #199

@anp

This comment has been minimized.

Show comment
Hide comment
@anp

anp Apr 30, 2018

Owner

Hi @Centril! If I'm reading correctly, the only thing remaining is to configure the RFCs repo string via a configuration file. If that's the case, let's get this in and create a follow-up issue or add a comment on the issue I linked before?

Owner

anp commented Apr 30, 2018

Hi @Centril! If I'm reading correctly, the only thing remaining is to configure the RFCs repo string via a configuration file. If that's the case, let's get this in and create a follow-up issue or add a comment on the issue I linked before?

@Centril

This comment has been minimized.

Show comment
Hide comment
@Centril

Centril Apr 30, 2018

Collaborator

@anp that works for me :) Sorry about not following up on this sooner.

One thing I'm a bit unsure about as to making this work for all repos is whether there is one instance of the rfcbot program running for rust-lang/rust and rust-lang/rfcs or if there are separate instances for each.

If there is just one instance, then you need to be able to configure close / postpone behavior separately for each repo.

For now I propose:

[fcp_behaviour."rust-lang/rfcs"]
close = true
postpone = true

[teams]

# other stuff....
Collaborator

Centril commented Apr 30, 2018

@anp that works for me :) Sorry about not following up on this sooner.

One thing I'm a bit unsure about as to making this work for all repos is whether there is one instance of the rfcbot program running for rust-lang/rust and rust-lang/rfcs or if there are separate instances for each.

If there is just one instance, then you need to be able to configure close / postpone behavior separately for each repo.

For now I propose:

[fcp_behaviour."rust-lang/rfcs"]
close = true
postpone = true

[teams]

# other stuff....

@anp anp merged commit 9f52efd into anp:master Apr 30, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@anp

This comment has been minimized.

Show comment
Hide comment
@anp

anp Apr 30, 2018

Owner

Thank you so much!

Owner

anp commented Apr 30, 2018

Thank you so much!

@Centril Centril deleted the Centril:feature/human-friendly-incantations branch Apr 30, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment