Protect main
Turn on Require change requests for the workspace, commit the setting, and see what the rule does to a request you wrote yourself.
Goal
You know where the rule that protects main lives, when it starts to apply and what it does to the author of a change, and you have left your workspace the way you want it.
Before you start
Open Workspaces → Organisation and open the workspace's settings. There is one card for each workspace. At the foot of yours are two icons. Click the first, the pair of sliders: it is Settings.
Switch on Require change requests. The dialog is Workspace settings, and the rule is at the top of its right-hand side: Require change requests, with the line When enabled, direct saves to main are blocked — all edits must go through a change request branch. Switch it on. Under it is the Review policy: how many approvals a request needs, whether authors can approve their own requests, whether a reviewer must be assigned, and more. Leave those as they are.

Press Save settings. A notice reads Settings saved. They take effect once you commit Talon/workspace.yaml from Pending changes., and the chip gains a count. A workspace's settings are a file in its repository, like everything else:
Talon/workspace.yaml.
Commit the setting. Click the chip and choose Pending changes.
workspace.yamlis under STAGED, and among the green lines of its diff isrequires_change_requests: true. Most of the file is green, because this first save writes every setting in the dialog into it. TypeRequire change requests on mainand press Commit. A notice reads Committed 1 change. The rule applies from this commit, and not before: what counts is the file as committed, not the switch as you left it.

Make a small change on a branch. Do what you did in the first lesson, with a new branch: click the chip, choose New branch…, and call it
raise-ssh-severity. When the foot of the Workbench names the branch, openT1110_ssh-password-guessing-from-one-address.yaml, changeseverity: mediumtoseverity: high, and commit it from Commits with the messageRaise SSH password guessing to high.
Open the request for review. In Workspaces → Change Requests, press Review on raise-ssh-severity, then Open for review. Last time the line under the name turned green. This time it is amber, and it reads: This workspace requires change requests, so a change you wrote or edited needs someone else's approval. Ask another member, or turn off Require change requests in the workspace's settings. The Approve and merge button is grey.

Close the request without merging. That amber line is the rule at work: the person who wrote a change cannot be the one who approves it. You do not want this change, so drop it. Press ⋯, the More actions button beside Approve and merge, and choose Close without merging. A notice reads Change request closed, the status becomes Closed, the line under the name reads Closed without merging., and the chip goes back to main. The request moves to the Merged tab, marked Closed.

Decide how to leave the workspace. If other people work here, leave the rule on. If you work alone, switch it off again, or no request of yours can ever be merged: open the workspace's settings, switch Require change requests off, press Save settings, and commit from Pending changes with the message
Stop requiring change requests.
You should now see
In Workspaces → Change Requests, nothing under Active. Under Merged, raise-ssh-severity marked Closed above raise-ssh-threshold marked Merged. The change to the severity never reached main: its request was closed, not merged.
Two things about what you just did are worth knowing.
- The commits in steps 4 and 8 went straight to
main, the second of them with the rule on. As the workspace's owner you can still commit tomaindirectly. What the rule took from you is approving your own request. - The switch Authors can't approve their own change requests, in the Review policy, does the same to an author on its own, with Require change requests off. The amber line then starts This workspace blocks self-approval. Like the rule itself, it applies once its change to
Talon/workspace.yamlis committed.
Quick check
Go deeper
- The ⋯ menu on an open request also has Refresh, Re-validate and Delete, and Update branch once
mainhas moved on since the branch was made. - Change Requests, for reviewers, comments and what each check can block.