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

Track a remote branch for an MSC #21

Open
ShadowJonathan opened this issue May 6, 2022 · 3 comments
Open

Track a remote branch for an MSC #21

ShadowJonathan opened this issue May 6, 2022 · 3 comments

Comments

@ShadowJonathan
Copy link

Is your feature request related to a problem? Please describe.

In situations where the original author may want to delegate an MSC, and where - due to security reasons, or likewise - the author is unable to grant the delegate author access to the PR's origin repository, it may want to have the PR branch be updated from a remote branch instead, such as the delegate author's own fork.

In other situations, an organisation may want to - for legal reasons, or likewise - develop the commits on their own git server, but have them be fetched to the MSC's PR branch.

Describe the solution you'd like.

For these problems, I'd like the mscbot to be able to be set up to watch a remote branch. Be it on github, or on any compatible git server.

The original author of the PR has to setup the watch, via @mscbot watch <repository URL> <branch>.

After this, the MSC bot will only try to fetch commits from that branch via a git pull-like mechanism. That is to say; it will not force-push the PR branch with updates from the remote branch, it will only append new commits that were present in the remote branch, but not in the PR branch.

In other words, the MSC bot will only fast-forward the PR branch to the remote branch.

@ShadowJonathan
Copy link
Author

Alternatively to the watch command, the original author could add Watch: <repo URL> <branch> to the description instead.

This'd enable the mscbot to be more stateless, so I think that might be a better solution.

@anoadragon453
Copy link
Member

It would be easiest to watch branches via github webhook (or if other platforms are supported), otherwise you would need to poll potentially hundreds of git repos, which is a lot more than what the bot is doing today.

@ShadowJonathan
Copy link
Author

Probably a hybrid; Webhook the repository servers that support it, and poll (hourly or 6-hourly) the remaining servers.

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