Skip to content

Commit

Permalink
Merge pull request #165 from guardian/ts/update-ruleset-recs
Browse files Browse the repository at this point in the history
docs: update ruleset instructions
  • Loading branch information
tjsilver authored Apr 16, 2024
2 parents 2578424 + 21fe4a5 commit c191481
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions github-rulesets.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ An example of this is the [GHA Scala Library Release Workflow](https://github.co

To re-apply branch protection of the default branch via rulesets:

* Edit the Custom Property `production_status` on your repo to select `production`. This will enable an organisation-level ruleset on your repo which applies branch protection to the default branch . (N.B. This ruleset is configured to allow the 'Gu Scala Library Release' app to bypass the branch protection.)
* Edit the Custom Property `production_status` on your repo to select `production`. This will enable an organisation-level ruleset on your repo which applies branch protection to the default branch. (N.B. This ruleset is configured to allow the 'Gu Scala Library Release' app to bypass the branch protection.)

To require CI checks to pass before merge:
* Create a second ruleset in your repo with the 'Branch protection' property 'Require status checks to pass' -> 'Require branches to be up to date before merging'.
* Type your repo's workflow name(s) (not to be confused with the filename) into the 'Status checks that are required' box. For example, if your repo has a CI workflow with the name 'CI', then the setting would look like this:
* Type your CI workflow's job name(s) into the 'Status checks that are required' box.
* For example, if your repo has a CI workflow with a job called 'CI', then the setting would look like this:
![status_checks.png](images/status_checks.png)
* Or if your workflow has several jobs called 'build', 'trigger-workflow' and 'check-status', it would look like this:
![status_checks.png](images/status_checks_jobs.png)
* Add your app (e.g. 'Gu Scala Library Release') to the ruleset bypass list.

### To enable your repo to access the GitHub App
Expand Down
Binary file added images/status_checks_jobs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c191481

Please sign in to comment.