File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
Expand file tree Collapse file tree 1 file changed +39
-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+ * Pull requests whose last commit before merging has an @arm.com author
16+ are assumed to be team PR where we put a changelog entry if necessary.
17+ EOF
18+ }
19+
20+ if [[ $# -ne 1 ]]; then
21+ help >&2
22+ exit 120
23+ fi
24+ if [[ " $1 " == ' --help' ]]; then
25+ help
26+ exit
27+ fi
28+
29+ revision_range=$1
30+ merge_commits=$( git log --merges --first-parent --format=%H $revision_range )
31+ for c in $merge_commits ; do
32+ if [[ $( git log -n1 --format=%ae $c \^ 2) == * @arm.com ]]; then
33+ continue
34+ fi
35+ if git diff --name-only $c ~1 $c | grep -q ChangeLog; then
36+ continue
37+ fi
38+ git show --oneline $c | grep .
39+ done
You can’t perform that action at this time.
0 commit comments