rust-lang / triagebot

Automation/tooling for Rust spaces
https://triage.rust-lang.org
Apache License 2.0
169 stars 75 forks source link

Add an issue transfer command #1780

Closed ehuss closed 2 months ago

ehuss commented 4 months ago

This adds a command to transfer an issue from one repository to another. People occasionally file issues in the wrong repo, and it is convenient to transfer them. Unfortunately you need write access to both repositories to transfer. Often that isn't the case (like transferring between cargo and clippy or vice-versa).

The command is @rustbot transfer reponame. The source repository needs a [transfer] table to enable the feature.

It is restricted to any team member. I'm not sure if that's the right balance of permissions, but I think it is a good starting place, since this is a fairly destructive command.

Unfortunately due to the way the API works, there is no visual indication that the issue has transferred (unlike the Web UI button, which shows a big notice). I think we'll just need to emphasize in the documentation that after the running the command you need to manually reload the page to view it in the new location.

Closes #166

ehuss commented 3 months ago

The purpose of this PR is to explicitly allow people who don't have write permissions in both repos to use it. If they already have write permissions, they can use the UI to transfer.

jackh726 commented 3 months ago

Right - my thought is that to start it might be useful for only those people to use this for now (so they can fix things if something goes wrong). But maybe I'm just being to cautious :)

jackh726 commented 2 months ago

I can merge this with a rebase

ehuss commented 2 months ago

I can merge this with a rebase

Thanks, done!