mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-21 09:06:46 +09:00
Backport #39657 by @bircni Release notes: revert commits and the commits they revert are now left out of the git-cliff changelog. A step before git-cliff finds commits whose subject starts with "revert", reads the PR numbers on their revert lines, and writes both SHAs to `.cliffignore`. Snap: since the move from Launchpad to GitHub Actions, every build was uploaded to `latest/edge`, including the stable-grade build that `part-gitea-pull.sh` makes for an unreleased tag. Launchpad used to release those builds to candidate and stable automatically. Without that, v28.0.0 had to be promoted by hand and v28.1.0 stayed in edge. Stable-grade snaps now go to `latest/stable` and `latest/candidate`; main builds still go to edge. Candidate has to be updated too because the pull script compares against it. Signed-off-by: bircni <bircni@icloud.com> Co-authored-by: bircni <bircni@icloud.com>
This commit is contained in:
1 parent
175bc89bf9
commit
20f73b2230
4 files changed
+33
-6
No files matched your search
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
# Prints the revert commits in the given range and the commits they revert, for git-cliff's .cliffignore
|
||||
range="${1:?usage: $0 <revision-range>}"
|
||||
commits=$(git log --format='%H %s' "$range")
|
||||
|
||||
shopt -s nocasematch
|
||||
while read -r sha subject; do
|
||||
[[ "$subject" == revert* ]] || continue
|
||||
echo "$sha"
|
||||
for pr in $(git show -s --format=%B "$sha" | grep -i revert | grep -oE '(#|/pull/)[0-9]+' | grep -oE '[0-9]+' || true); do
|
||||
grep -F "(#$pr)" <<< "$commits" | cut -d' ' -f1 || true
|
||||
done
|
||||
done <<< "$commits"
|
||||
Reference in new issue
Block a user