Filters
Zo zoek je
  • Gewone woorden vinden namen, teksten en voorbeelden.
  • "twee woorden" vindt precies die zin.
  • --naam of -x vindt een optie.
  • #woord zoekt alleen in commando's.
  • @grep vindt lessen en labs die grep gebruiken.
  • Filters: cat:network · in:labs · in:notes · level:rhcsa · ch:8 · root:yes. Zet ! voor een woord om het weg te laten. OR tussen woorden betekent één ervan.
  • ↑ ↓ bewegen · Enter openen · Esc sluiten · / zoeken

Hoofdstuk 6Naam in de cursus: GitHub collaboration

Work with GitHub pull requests

On GitHub, every change goes through a pull request (PR): a branch, a description, automatic checks, a review, then a merge. This is how teams keep main safe — and how infrastructure changes get reviewed before they touch production.

  • 5 Lessen
  • 2 Commando's

Dit deel is nog niet vertaald. Je ziet de Engelse tekst.

$ als gewone gebruiker# als root (of met sudo)

6.1

Follow the GitHub flow

Branch → commits → push → pull request → checks and review → merge → delete branch.

git switch -c fix/nsg-ssh
git commit -am "Close SSH to the internet"
git push -u origin fix/nsg-ssh
gh pr create --title "Close SSH to the internet" --body "Only Bastion may reach port 22."
gh pr checks
gh pr view --web
gh pr merge --squash --delete-branch

Commando's in deze les

6.2

Write a good pull request

A reviewer must understand the why and the risk in one minute.

  • Title: what changes, in one line.
  • Body: why, how it was tested, the risk, and for infrastructure: the plan output (what will be created, changed, destroyed).
  • Keep it small: one topic per PR.
  • Link the issue: Fixes #12 closes the issue when merged.

6.3

Review changes

Review the logic, the security and the tests — not only the style.

gh pr checkout 42
gh pr diff 42
gh pr review 42 --approve
gh pr review 42 --request-changes --body "The NSG still allows 0.0.0.0/0 on 3389."
Look forExample
SecretsKeys, passwords, tokens in code or config
Destroys-/+ or - on databases and disks in a Terraform plan
Wide access0.0.0.0/0, * actions, Owner roles
Missing testsNew code without a check in the pipeline

Commando's in deze les

6.4

Protect the main branch

Branch protection rules (or rulesets) force the flow: no direct pushes, required reviews and required checks.

Settings → Rules → Rulesets → New branch ruleset:

  • Target: main.
  • Require a pull request before merging, with at least 1 approval.
  • Require status checks to pass (for example terraform-plan, lint, security-scan).
  • Block force pushes and deletions.
  • Require signed commits (optional, see Secure your Git work).
  • CODEOWNERS review for sensitive folders.
.github/CODEOWNERS
/envs/prod/   @s0sta
/modules/     @s0sta

6.5

Use issues and releases

Issues track work and bugs; releases mark versions with notes and files.

gh issue create --title "Rotate storage keys" --label security
gh issue list --label security
git tag -a v1.3.0 -m "Staging on Azure"
git push origin v1.3.0
gh release create v1.3.0 --generate-notes

Commando's in deze les

Alle commando's in dit hoofdstuk