Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion WORKFLOW.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Prescriptive style/legibility rules. Cheap to check, necessary but not sufficien
- **Reusable-workflow permissions.** Job-level `permissions:` are validated **before** `if:`, so even a skipped job needs valid permissions. Grant least privilege; a reusable callee's extra scope (e.g. `actions: write` for cleanup) is granted by the **caller**.
- **Allowlist `success` and `skipped` explicitly** across optional dependencies (`!= 'failure'` lets `cancelled` through).
- **Docker layer cache.** Cache to/from a registry tag (`type=registry`), never `type=gha`.
- **Line endings.** Workflow YAML follows `.editorconfig` (CRLF here); committed JSON state files follow the repo's JSON rule. Preserve endings on every edit.
- **Line endings.** Workflow YAML is LF (Actions and Dependabot rewrite it that way); other files follow `.editorconfig`, and committed JSON state files follow the repo's JSON rule. Preserve endings on every edit.

## 3. Architecture

Expand Down
2 changes: 1 addition & 1 deletion repo-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ for name in develop main; do
id=$(gh api repos/ptr727/ProjectTemplate/rulesets --jq ".[] | select(.name==\"$name\") | .id")
gh api "repos/ptr727/ProjectTemplate/rulesets/$id" \
--jq '{name, target, enforcement, bypass_actors, conditions, rules}' \
| jq -S '.' > "repo-config/$name.json"
| jq -S --indent 4 '.' > "repo-config/$name.json"
done
```

Expand Down
130 changes: 65 additions & 65 deletions repo-config/develop.json
Original file line number Diff line number Diff line change
@@ -1,68 +1,68 @@
{
"bypass_actors": [
{
"actor_id": 5,
"actor_type": "RepositoryRole",
"bypass_mode": "always"
}
],
"conditions": {
"ref_name": {
"exclude": [],
"include": [
"refs/heads/develop"
]
}
},
"enforcement": "active",
"name": "develop",
"rules": [
{
"type": "deletion"
"bypass_actors": [
{
"actor_id": 5,
"actor_type": "RepositoryRole",
"bypass_mode": "always"
}
],
"conditions": {
"ref_name": {
"exclude": [],
"include": [
"refs/heads/develop"
]
}
},
{
"type": "non_fast_forward"
},
{
"type": "required_linear_history"
},
{
"type": "required_signatures"
},
{
"parameters": {
"allowed_merge_methods": [
"squash"
],
"dismiss_stale_reviews_on_push": true,
"require_code_owner_review": false,
"require_last_push_approval": false,
"required_approving_review_count": 0,
"required_review_thread_resolution": true,
"required_reviewers": []
},
"type": "pull_request"
},
{
"parameters": {
"do_not_enforce_on_create": false,
"required_status_checks": [
{
"context": "Check pull request workflow status job",
"integration_id": 15368
}
],
"strict_required_status_checks_policy": false
},
"type": "required_status_checks"
},
{
"parameters": {
"review_draft_pull_requests": true,
"review_on_push": true
},
"type": "copilot_code_review"
}
],
"target": "branch"
"enforcement": "active",
"name": "develop",
"rules": [
{
"type": "deletion"
},
{
"type": "non_fast_forward"
},
{
"type": "required_linear_history"
},
{
"type": "required_signatures"
},
{
"parameters": {
"allowed_merge_methods": [
"squash"
],
"dismiss_stale_reviews_on_push": true,
"require_code_owner_review": false,
"require_last_push_approval": false,
"required_approving_review_count": 0,
"required_review_thread_resolution": true,
"required_reviewers": []
},
"type": "pull_request"
},
{
"parameters": {
"do_not_enforce_on_create": false,
"required_status_checks": [
{
"context": "Check pull request workflow status job",
"integration_id": 15368
}
],
"strict_required_status_checks_policy": false
},
"type": "required_status_checks"
},
{
"parameters": {
"review_draft_pull_requests": true,
"review_on_push": true
},
"type": "copilot_code_review"
}
],
"target": "branch"
}
124 changes: 62 additions & 62 deletions repo-config/main.json
Original file line number Diff line number Diff line change
@@ -1,65 +1,65 @@
{
"bypass_actors": [
{
"actor_id": 5,
"actor_type": "RepositoryRole",
"bypass_mode": "always"
}
],
"conditions": {
"ref_name": {
"exclude": [],
"include": [
"refs/heads/main"
]
}
},
"enforcement": "active",
"name": "main",
"rules": [
{
"type": "deletion"
"bypass_actors": [
{
"actor_id": 5,
"actor_type": "RepositoryRole",
"bypass_mode": "always"
}
],
"conditions": {
"ref_name": {
"exclude": [],
"include": [
"refs/heads/main"
]
}
},
{
"type": "non_fast_forward"
},
{
"type": "required_signatures"
},
{
"parameters": {
"allowed_merge_methods": [
"merge"
],
"dismiss_stale_reviews_on_push": true,
"require_code_owner_review": false,
"require_last_push_approval": false,
"required_approving_review_count": 0,
"required_review_thread_resolution": true,
"required_reviewers": []
},
"type": "pull_request"
},
{
"parameters": {
"do_not_enforce_on_create": false,
"required_status_checks": [
{
"context": "Check pull request workflow status job",
"integration_id": 15368
}
],
"strict_required_status_checks_policy": false
},
"type": "required_status_checks"
},
{
"parameters": {
"review_draft_pull_requests": true,
"review_on_push": true
},
"type": "copilot_code_review"
}
],
"target": "branch"
"enforcement": "active",
"name": "main",
"rules": [
{
"type": "deletion"
},
{
"type": "non_fast_forward"
},
{
"type": "required_signatures"
},
{
"parameters": {
"allowed_merge_methods": [
"merge"
],
"dismiss_stale_reviews_on_push": true,
"require_code_owner_review": false,
"require_last_push_approval": false,
"required_approving_review_count": 0,
"required_review_thread_resolution": true,
"required_reviewers": []
},
"type": "pull_request"
},
{
"parameters": {
"do_not_enforce_on_create": false,
"required_status_checks": [
{
"context": "Check pull request workflow status job",
"integration_id": 15368
}
],
"strict_required_status_checks_policy": false
},
"type": "required_status_checks"
},
{
"parameters": {
"review_draft_pull_requests": true,
"review_on_push": true
},
"type": "copilot_code_review"
}
],
"target": "branch"
}