Skip to content

Commit e4cae48

Browse files
committed
fix to check wheather "update changelog" is alread committed or not
1 parent 059ebd3 commit e4cae48

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tool/releng

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ sub create_pull_request {
403403
}
404404

405405
# return if last commit is updating specs and changelogs
406-
my $last_commitlog = `git log -1 --oneline | cut -d ' ' -f2-`;
406+
my $last_commitlog = `git log --oneline master..HEAD | cut -d ' ' -f2-`;
407407
if($last_commitlog =~ /update changelogs/){
408408
infof "skip to update changelogs because the last commit is 'update changelogs'.\n";
409409
return;
@@ -418,10 +418,10 @@ sub create_pull_request {
418418
infof "skip to update changelogs because no merged pull request is found after the last release.\n"
419419
}
420420
if($ret || git_with_exit_code qw/diff --exit-code/){
421-
git qw/commit -am/, "update changelogs";
422421
git qw/config --global push.default matching/;
423422
git qw/config user.email/, '[email protected]';
424423
git qw/config user.name/, 'mackerel';
424+
git qw/commit -am/, "update changelogs";
425425
git qw/push -u/, "https://$ENV{GITHUB_TOKEN}\@github.com/$REPO_NAME.git";
426426
infof "Difference is pushed to GitHub.\n";
427427
}

0 commit comments

Comments
 (0)