Skip to content

Commit 31ed0d2

Browse files
bench-bot: take into account commits made before the command's start
1 parent e64f1a7 commit 31ed0d2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

cmd_runner.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,20 @@ cmd_runner_setup() {
1616
# set the Git user, otherwise Git commands will fail
1717
git config --global user.name command-bot
1818
git config --global user.email "<>"
19+
git config --global pull.rebase false
1920

2021
# Reset the branch to how it was on GitHub when the bot command was issued
2122
git reset --hard "$GH_HEAD_SHA"
2223

24+
# Some commands push commits to the requester's branch, therefore we should
25+
# pull the branch from GitHub before running a command it so that its
26+
# execution takes into account commits pushed before its start
27+
git remote add \
28+
github \
29+
"https://token:${GITHUB_TOKEN}@github.com/${GH_CONTRIBUTOR}/${GH_CONTRIBUTOR_REPO}.git"
30+
git pull --ff --no-edit github "$GH_CONTRIBUTOR_BRANCH"
31+
git remote remove github
32+
2333
cmd_runner_display_rust_toolchain
2434

2535
# https://github.com/paritytech/substrate/pull/10700

0 commit comments

Comments
 (0)