Skip to content

Commit 323c207

Browse files
authored
Merge pull request #14 from gilles-peskine-arm/check-missing-changelog
Script to find pull requests without a changelog entry
2 parents 74cd887 + 06b47f2 commit 323c207

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/bash
2+
set -e
3+
4+
help () {
5+
cat <<EOF
6+
Usage: $0 REVISION_RANGE
7+
Find Mbed TLS pull requests in the specified range of revisions that seem
8+
to be missing a changelog entry.
9+
10+
This script uses heuristics:
11+
* Pull requests are merge commits on the first-parent-path in the specified
12+
revision range.
13+
* Pull requests that modify ChangeLog or ChangeLog.d in any way are assumed
14+
to be ok.
15+
EOF
16+
}
17+
18+
if [[ $# -ne 1 ]]; then
19+
help >&2
20+
exit 120
21+
fi
22+
if [[ "$1" == '--help' ]]; then
23+
help
24+
exit
25+
fi
26+
27+
revision_range=$1
28+
merge_commits=$(git log --merges --first-parent --format=%H $revision_range)
29+
for c in $merge_commits; do
30+
if git diff --name-only $c~1 $c | grep -q ChangeLog; then
31+
continue
32+
fi
33+
git show -s --oneline $c | grep .
34+
done

0 commit comments

Comments
 (0)