mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-17 17:51:27 +08:00
fix: adversarial review — GitLab gate, shell safety, MR prefix preservation
Three fixes from adversarial review: 1. land-and-deploy: add GitLab gate after Step 0 — prevents detection/ execution mismatch where agent detects GitLab but all subsequent steps are GitHub-only 2. document-release: use heredoc for glab mr update body to avoid shell metacharacter mangling ($, backticks, !) in MR descriptions 3. retro: preserve original #/! prefix in PR/MR number extraction — GitLab !42 stays as !42, not incorrectly converted to #42 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -341,7 +341,7 @@ git log origin/<default> --since="<window>" --format="%at|%aN|%ai|%s" | sort -n
|
||||
git log origin/<default> --since="<window>" --format="" --name-only | grep -v '^$' | sort | uniq -c | sort -rn
|
||||
|
||||
# 5. PR/MR numbers from commit messages (GitHub #NNN, GitLab !NNN)
|
||||
git log origin/<default> --since="<window>" --format="%s" | grep -oE '[#!][0-9]+' | sed 's/^[#!]//' | sort -n | uniq | sed 's/^/#/'
|
||||
git log origin/<default> --since="<window>" --format="%s" | grep -oE '[#!][0-9]+' | sort -t'#' -k1 | uniq
|
||||
|
||||
# 6. Per-author file hotspots (who touches what)
|
||||
git log origin/<default> --since="<window>" --format="AUTHOR:%aN" --name-only
|
||||
@@ -813,7 +813,7 @@ git -C <path> log origin/$DEFAULT --since="<start_date>T00:00:00" --format="%at|
|
||||
git -C <path> shortlog origin/$DEFAULT --since="<start_date>T00:00:00" -sn --no-merges
|
||||
|
||||
# PR/MR numbers from commit messages (GitHub #NNN, GitLab !NNN)
|
||||
git -C <path> log origin/$DEFAULT --since="<start_date>T00:00:00" --format="%s" | grep -oE '[#!][0-9]+' | sed 's/^[#!]//' | sort -n | uniq | sed 's/^/#/'
|
||||
git -C <path> log origin/$DEFAULT --since="<start_date>T00:00:00" --format="%s" | grep -oE '[#!][0-9]+' | sort -t'#' -k1 | uniq
|
||||
```
|
||||
|
||||
For repos that fail (deleted paths, network errors): skip and note "N repos could not be reached."
|
||||
|
||||
@@ -88,7 +88,7 @@ git log origin/<default> --since="<window>" --format="%at|%aN|%ai|%s" | sort -n
|
||||
git log origin/<default> --since="<window>" --format="" --name-only | grep -v '^$' | sort | uniq -c | sort -rn
|
||||
|
||||
# 5. PR/MR numbers from commit messages (GitHub #NNN, GitLab !NNN)
|
||||
git log origin/<default> --since="<window>" --format="%s" | grep -oE '[#!][0-9]+' | sed 's/^[#!]//' | sort -n | uniq | sed 's/^/#/'
|
||||
git log origin/<default> --since="<window>" --format="%s" | grep -oE '[#!][0-9]+' | sort -t'#' -k1 | uniq
|
||||
|
||||
# 6. Per-author file hotspots (who touches what)
|
||||
git log origin/<default> --since="<window>" --format="AUTHOR:%aN" --name-only
|
||||
@@ -560,7 +560,7 @@ git -C <path> log origin/$DEFAULT --since="<start_date>T00:00:00" --format="%at|
|
||||
git -C <path> shortlog origin/$DEFAULT --since="<start_date>T00:00:00" -sn --no-merges
|
||||
|
||||
# PR/MR numbers from commit messages (GitHub #NNN, GitLab !NNN)
|
||||
git -C <path> log origin/$DEFAULT --since="<start_date>T00:00:00" --format="%s" | grep -oE '[#!][0-9]+' | sed 's/^[#!]//' | sort -n | uniq | sed 's/^/#/'
|
||||
git -C <path> log origin/$DEFAULT --since="<start_date>T00:00:00" --format="%s" | grep -oE '[#!][0-9]+' | sort -t'#' -k1 | uniq
|
||||
```
|
||||
|
||||
For repos that fail (deleted paths, network errors): skip and note "N repos could not be reached."
|
||||
|
||||
Reference in New Issue
Block a user