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

Add branch protection support for required_status_checks checks object #2157

Open
testworksau opened this issue Jan 12, 2022 · 4 comments · May be fixed by #2884
Open

Add branch protection support for required_status_checks checks object #2157

testworksau opened this issue Jan 12, 2022 · 4 comments · May be fixed by #2884

Comments

@testworksau
Copy link
Contributor

It's possible to set branch protections using the contexts field within the RequiredStatusChecks class, however, according to the documentation, contexts is deprecated.

checks (an array of objects) will replace contexts as it allows you to configure the source of the check.

An example of the raw request to set required status checks using the checks object is:

    "required_status_checks":{
        "strict": false,
        "checks": [
            {
                "context": "A Required Check set to a given app id",
                "app_id": 3414
            },
            {
                "context": "A Required Check set to any source",
                "app_id": -1
            }
        ]
    }

image

@stale
Copy link

stale bot commented Apr 16, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Apr 16, 2022
@stale stale bot closed this as completed Apr 28, 2022
@EnricoMi EnricoMi reopened this Aug 21, 2023
@stale stale bot removed the stale label Aug 21, 2023
@EnricoMi
Copy link
Collaborator

@testworksau Would you like to provide a PR to fix this? The existing context parameter should become Opt[list[Union[str, Tuple[str, int]]]] so that the app_id can be omitted for individual contexts.

@EnricoMi
Copy link
Collaborator

Note: Method edit_required_status_checks has to be migrated as well.

@treee111
Copy link
Contributor

will tackle this, see comment #2873 (comment)

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

Successfully merging a pull request may close this issue.

3 participants