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.
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.
https://github.com/paritytech/bench-bot/issues/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).
Otherwise, fetch the pull request in the Github API for the field
"maintainer_can_modify": true
.