File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 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
You can’t perform that action at this time.
0 commit comments