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

Check for push permissions before running a benchmark #55

Description

@joao-paulo-parity

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions