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

signer: Check that PRs will go to the right place #480

Open
jku opened this issue Nov 28, 2024 · 1 comment
Open

signer: Check that PRs will go to the right place #480

jku opened this issue Nov 28, 2024 · 1 comment

Comments

@jku
Copy link
Member

jku commented Nov 28, 2024

It would be trivial to check if any git remote is theupdateframework/tuf-on-ci-template when signer starts: this is some sort of forking/cloning error and we could error out with a message explaining that.

cc @sorayaormazabalmayo

@jku
Copy link
Member Author

jku commented Nov 29, 2024

Hmm, I think this was not the actual issue that lead to filing this: the real problem was that the docs implied forking the template repo is correct, when "Use This Template" is actually correct. If a real fork was used, then PRs would get directed towards tuf-on-ci-template by GitHub -- this is not ideal.

I think we can't really figure this issue from signer config alone: it is visible in GitHub API though and could at least theoretically be checked in signer:

  • In signer we can check if pull-remote and push-remote are the same and
  • we can parse ORG and REPO for the remote (I think this is already done at least in one place):
  • if the rest API response for repos/ORG/REPO contains a "parent" value, then the repo is a fork and and the suggested PR will go to the parent

This sounds a little too complicated though

@jku jku changed the title signer: Check that remote is not theupdateframework/tuf-on-ci-template signer: Check that PRs will go to the right place Nov 29, 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

No branches or pull requests

1 participant