Add branch protection for "Execute Notebooks" and "API Checks"
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.
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
I'm trying to test this out and will close if true.
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.
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
Fixed by @frankharkins in https://github.com/Qiskit/documentation/pull/4349 🥳