Skip to content
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.

Check for push permissions before running a benchmark #55

Open
joao-paulo-parity opened this issue Sep 9, 2021 · 0 comments
Open

Check for push permissions before running a benchmark #55

joao-paulo-parity opened this issue Sep 9, 2021 · 0 comments

Comments

@joao-paulo-parity
Copy link
Contributor

It's somewhat pointless to run a weights benchmark if the bot is not able to push the generated weights. Some check should be implemented to avoid running the benchmark in that case and, optionally, provide a way of forcing the run through some extra command.

#54 was proposed but that's supposed to be for recovery in case of unexpected errors, not the default behavior.

Checking for push permissions should be straightforward:

  • First, check that the pull request's branch is hosted somewhere the bot can push (e.g. if it's a paritytech repository, then it can).

    • There might be a smarter way of checking for write permissions through the Github API, but maybe it's not worth the extra complication.
  • Otherwise, fetch the pull request in the Github API for the field "maintainer_can_modify": true.

@Vovke Vovke added duplicate This issue or pull request already exists and removed duplicate This issue or pull request already exists labels Apr 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants