summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2016-04-18 19:16:03 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-08-04 15:22:24 +0100
commit9ddb513a7ff3c2cb213f22db95321c490605c6c8 (patch)
treea80ffc4daaf1ded248fd30c97fa042aef392052a /scripts
parent1d7228c565b881e2006af562f3dd6a42bec73eea (diff)
downloadpoky-9ddb513a7ff3c2cb213f22db95321c490605c6c8.tar.gz
create-pull-request: set subject automatically for cover latter
Set cover letter's subject automatically as the patch's subject when there is only one patch. [YOCTO #9410] (From OE-Core rev: 162b80f8a4670befaf6ffd2c178671cf7370b767) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/create-pull-request8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/create-pull-request b/scripts/create-pull-request
index 9ea28a1652..3f30cf1965 100755
--- a/scripts/create-pull-request
+++ b/scripts/create-pull-request
@@ -261,7 +261,13 @@ if [ -n "$BODY" ]; then
261 sed -i "/BLURB HERE/ d" "$CL" 261 sed -i "/BLURB HERE/ d" "$CL"
262fi 262fi
263 263
264# If the user specified a subject, replace the SUBJECT token with it. 264# Set subject automatically if there is only one patch
265patch_cnt=`git log --pretty=oneline ${RELATIVE_TO}..${L_BRANCH} | wc -l`
266if [ -z "$SUBJECT" -a $patch_cnt -eq 1 ]; then
267 SUBJECT="`git log --format=%s ${RELATIVE_TO}..${L_BRANCH}`"
268fi
269
270# Replace the SUBJECT token with it.
265if [ -n "$SUBJECT" ]; then 271if [ -n "$SUBJECT" ]; then
266 sed -i -e "s/\*\*\* SUBJECT HERE \*\*\*/$SUBJECT/" "$CL" 272 sed -i -e "s/\*\*\* SUBJECT HERE \*\*\*/$SUBJECT/" "$CL"
267fi 273fi