الفلاتر
طريقة البحث
  • الكلمات العادية تجد الأسماء والنصوص والأمثلة.
  • "كلمتان" تجد العبارة بالضبط.
  • --name أو -x تجد خيارًا.
  • #كلمة تبحث داخل الأوامر فقط.
  • @grep تجد الدروس والمعامل التي تستخدم grep.
  • الفلاتر: cat:network · in:labs · level:rhcsa · ch:8 · root:yes. ضع ! قبل كلمة لاستبعادها. OR بين الكلمات تعني إحداها.
  • ↑ ↓ للتنقل · Enter للفتح · Esc للإغلاق · / للبحث

الفصل 6الاسم في الدورة: 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 الدروس
  • 2 الأوامر

هذا الجزء لم يُترجم بعد. أنت ترى النص الإنجليزي.

$ مستخدم عادي# بصلاحية root (أو مع 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

الأوامر في هذا الدرس

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

الأوامر في هذا الدرس

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

الأوامر في هذا الدرس

كل الأوامر في هذا الفصل