Closed ljharb closed 2 years ago
I'd like to work on this issue.
I want to work along with Mahira on this issue.
Hey @ljharb! Would be great if you could explain what you mean by - restricting to a specific source instead of "any source".
@MaheraFurniturewala in branch protection settings:
@ljharb Can you also explain how to calculate the percentage?
In this example, there’s 5 checks, and 60% of them have a required source.
@ljharb Here we referring source to github remote right?
No - the "source" in this case is the Github App generating the status check. For example, Github Actions, Codecov, etc.
query { viewer { repositories( first: 100 affiliations: [OWNER, ORGANIZATION_MEMBER, COLLABORATOR]) { totalCount pageInfo { endCursor hasNextPage } nodes { name nameWithOwner defaultBranchRef { name branchProtectionRule { allowsForcePushes allowsDeletions dismissesStaleReviews requiredApprovingReviewCount requiresApprovingReviews requiresCodeOwnerReviews requiresConversationResolution restrictsPushes requiredStatusChecks { app { id } } } } } } } }
Hey @ljharb This query might be useful for getting the status checks and their apps. But I can't test it right now, as I don't have any repository that have checks and branch protection set up. Can you help me out with this?
@PriyaBihani do you mean help you set up a repo with them? you can copy the workflow files from this repo, and then once they've ran, they'll show up as an option in branch protections. Otherwise, we can grab some pairing time after next week.
Individual branch protections can now restrict to a specific source (github app) instead of "any source".
A metric we should add is "percentage of branch protections that are restricted", with the default being 100.