Skip to content

Commit ff6484d

Browse files
authored
Merge branch 'main' into sorting/add-bubble-sort
2 parents e465597 + 24739f7 commit ff6484d

3 files changed

Lines changed: 126 additions & 1 deletion

File tree

.github/labels.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
- name: "status/backlog"
2+
color: "cfd3d7"
3+
description: "Not yet prioritized for a sprint."
4+
- name: "status/in-progress"
5+
color: "0b6e99"
6+
description: "Actively being worked on."
7+
- name: "status/blocked"
8+
color: "d93f0b"
9+
description: "Cannot proceed until an external dependency is resolved."
10+
- name: "status/review"
11+
color: "fbca04"
12+
description: "Ready for code review or testing."
13+
- name: "status/ready"
14+
color: "0e8a16"
15+
description: "Groomed and ready to be picked up."
16+
- name: "type/feature"
17+
color: "1d76db"
18+
description: "Adds new runtime capabilities or visualizations."
19+
- name: "type/bugfix"
20+
color: "d73a4a"
21+
description: "Corrects a functional defect."
22+
- name: "type/refactor"
23+
color: "f9d0c4"
24+
description: "Improves structure without changing behaviour."
25+
- name: "type/docs"
26+
color: "5319e7"
27+
description: "Documentation or knowledge-base updates."
28+
- name: "type/tooling"
29+
color: "0366d6"
30+
description: "Tooling, build, or automation tasks."
31+
- name: "domain/core"
32+
color: "0052cc"
33+
description: "Affects com.soobak.algo.core primitives or pipeline."
34+
- name: "domain/sorting"
35+
color: "8a2be2"
36+
description: "Affects sorting-domain models, algorithms, or visualizers."
37+
- name: "domain/visualization"
38+
color: "b60205"
39+
description: "UI or rendering concerns for algorithm playback."
40+
- name: "domain/ci"
41+
color: "6f42c1"
42+
description: "CI/CD, GitHub Actions, or release automation."
43+
- name: "domain/testing"
44+
color: "1f6feb"
45+
description: "Test harnesses, fixtures, or coverage work."
46+
- name: "priority/high"
47+
color: "b60205"
48+
description: "Critical for the next release or demo."
49+
- name: "priority/medium"
50+
color: "fbca04"
51+
description: "Important but can wait one iteration."
52+
- name: "priority/low"
53+
color: "94d3a2"
54+
description: "Nice-to-have or low urgency."
55+
- name: "needs/triage"
56+
color: "fef2c0"
57+
description: "Requires triage before work can start."
58+
- name: "needs/tests"
59+
color: "d4c5f9"
60+
description: "Missing or insufficient automated coverage."
61+
- name: "needs/docs"
62+
color: "f9bc2f"
63+
description: "Documentation updates are required before closure."

.github/workflows/commit-sentinel.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
1+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
22
name: Commit Sentinel
33

44
on:
@@ -41,6 +41,21 @@ jobs:
4141
commit_file="$GITHUB_WORKSPACE/.git/commit_range"
4242
commits=""
4343
44+
allowed_unsigned_commits=(
45+
deceb7aa4e4c19deae5a90d84c8b52b327691ae6
46+
c6476b9aaadf0db91b9e119e6b2d2d92d2348736
47+
)
48+
49+
is_allowed_unsigned() {
50+
local target="$1"
51+
for legacy in "${allowed_unsigned_commits[@]}"; do
52+
if [ "$legacy" = "$target" ]; then
53+
return 0
54+
fi
55+
done
56+
return 1
57+
}
58+
4459
ensure_commit() {
4560
git rev-parse --quiet --verify "${1}^{commit}" > /dev/null 2>&1
4661
}
@@ -76,6 +91,10 @@ jobs:
7691
echo "COMMIT_LIST_FILE=$commit_file" >> "$GITHUB_ENV"
7792
7893
while read -r commit; do
94+
if is_allowed_unsigned "$commit"; then
95+
echo "::notice::Commit $commit skipped: legacy unsigned commit allowed." >&2
96+
continue
97+
fi
7998
if ! git verify-commit "$commit" >/dev/null 2>&1; then
8099
echo "::error::Commit $commit lacks a trusted signature" >&2
81100
exit 1
@@ -113,3 +132,6 @@ jobs:
113132
if ($invalid.Count -gt 0) {
114133
Write-Error "Commit message(s) violate ':gitmoji: scope: message' convention:`n- " + ($invalid -join "`n- ")
115134
}
135+
136+
137+

.github/workflows/sync-labels.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Sync Labels
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
paths:
7+
- .github/labels.yml
8+
9+
permissions:
10+
contents: read
11+
issues: write
12+
13+
jobs:
14+
sync-labels:
15+
name: Sync Repository Labels
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
- name: Sync labels via gh api
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
shell: bash
24+
run: |
25+
set -euo pipefail
26+
labels_json=$(ruby -ryaml -rjson -e 'puts YAML.load_file(ARGV[0]).to_json' .github/labels.yml)
27+
echo "$labels_json" | jq -c '.[]' | while read -r label; do
28+
name=$(echo "$label" | jq -r '.name')
29+
color=$(echo "$label" | jq -r '.color // "cfd3d7"' | tr '[:lower:]' '[:upper:]' | tr -d '#')
30+
description=$(echo "$label" | jq -r '.description // ""')
31+
encoded_name=$(jq -nr --arg v "$name" '$v|@uri')
32+
if gh api --silent --method PATCH "/repos/${GITHUB_REPOSITORY}/labels/${encoded_name}" \
33+
-f new_name="$name" -f color="$color" -f description="$description"; then
34+
echo "Updated label: $name"
35+
else
36+
gh api --silent --method POST "/repos/${GITHUB_REPOSITORY}/labels" \
37+
-f name="$name" -f color="$color" -f description="$description"
38+
echo "Created label: $name"
39+
fi
40+
done

0 commit comments

Comments
 (0)