Skip to content

Dynamic Context Naming in required_status_checks Based on Repository Name #860

@devopssuren

Description

@devopssuren

Prerequisites:

  • Is the functionality available in the GitHub UI? If so, please provide a link to information about the feature.

yes, under static checks of branch protection for mandating the checks as required.
where the name of the static checks are dynamic and so unable to define the dynamic naming in required_static_checks: => context:

Image

New Feature

required_static_checks is only allowed with hardcoded or definite values only and we have scenario for each repo we have repo specific static checks.

for eg: we have PR test&build running in ado pipelines and the pipeline name is same as github repo name itself and hence the static check name as well, so if i want to define this pr build and test as mandate pr check, i would need to 1:1 repo:yaml file for branch protection rules to have unique static_checks naming.

Atleast i believe in the safe-settings, the repo name (suborgrepos) while getting applied in each repo with the respective branch protection rules and so is it possible to use the variable where the repo name is stored to apply this settings as the name for required_static_checks => context as well ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions