documentation icon indicating copy to clipboard operation
documentation copied to clipboard

Add branch protection for "Execute Notebooks" and "API Checks"

Open Eric-Arellano opened this issue 1 year ago • 3 comments

It's currrently possible to merge on red. This is particularly dangerous because the button to "merge when ready" will merge even if "API Checks" and "Execute Notebooks" are red. This is because we didn't set up those CI checks in branch protection due to issues with how we skip those jobs - when skipped, it would block the PR from merging since it never runs.

To fix, implement https://www.pantsbuild.org/blog/2022/10/10/skipping-github-actions-jobs-without-breaking-branch-protection.

Eric-Arellano avatar Sep 17 '24 15:09 Eric-Arellano

Looks like GitHub might have fixed this quirk, per https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks

Image

I'm trying to test this out and will close if true.

Eric-Arellano avatar Nov 14 '24 21:11 Eric-Arellano

The test for https://github.com/Qiskit/documentation/pull/2323 shows that this should be okay now 🚀 At least, I confirmed that the status checks don't block being added to a merge queue.

I didn't confirm that the merge queue works properly because I don't want to merge that PR - I'll reopen this issue if it fails.

Eric-Arellano avatar Nov 14 '24 21:11 Eric-Arellano

For some reason, the api-checks and Execute notebook jobs weren't actually being enforced. Perhaps we didn't save the config?

Update: yeah, it's broken. Refer to https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks

Eric-Arellano avatar Mar 18 '25 17:03 Eric-Arellano

Fixed by @frankharkins in https://github.com/Qiskit/documentation/pull/4349 🥳

Eric-Arellano avatar Dec 05 '25 14:12 Eric-Arellano