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

Add an issue transfer command #1780

Merged
merged 3 commits into from
May 4, 2024
Merged

Add an issue transfer command #1780

merged 3 commits into from
May 4, 2024

Conversation

ehuss
Copy link
Contributor

@ehuss ehuss commented Mar 2, 2024

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

Copy link
Member

@jackh726 jackh726 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code-wise this looks good.

Permissions-wise, I wonder if it would be to keep this pretty locked-down for now (though I do think once we've tested this a bit we can open up to perms to all team members). If it's possible for us to restrict this to users with write access to both repositories, maybe that would be good. Or, maybe it's not that big of a deal :)

@ehuss
Copy link
Contributor Author

ehuss commented Mar 11, 2024

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
Copy link
Member

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
Copy link
Member

jackh726 commented May 3, 2024

I can merge this with a rebase

ehuss added 3 commits May 3, 2024 11:18
This adds a method to add a generic "errors" handler, so callers don't
need to worry about errors if they don't need specific ones.

This also drops the generic type, since it wasn't really used.
@ehuss
Copy link
Contributor Author

ehuss commented May 3, 2024

I can merge this with a rebase

Thanks, done!

@jackh726 jackh726 merged commit da0d5ac into rust-lang:master May 4, 2024
2 checks passed
fmease added a commit to fmease/rust that referenced this pull request May 5, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request May 5, 2024
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.

Support @rustbot move $repo
2 participants