summaryrefslogtreecommitdiffstats
path: root/src/script
diff options
context:
space:
mode:
authorPatrick Donnelly <pdonnell@redhat.com>2018-10-01 22:42:39 +0200
committerPatrick Donnelly <pdonnell@redhat.com>2018-10-01 22:42:39 +0200
commitfe1dec424a21dc2e8202d9aadac91fc98fcec87e (patch)
treeeadb3052f11c8321776a2f31b4f5365de86b17a6 /src/script
parentMerge PR #24346 into master (diff)
downloadceph-fe1dec424a21dc2e8202d9aadac91fc98fcec87e.tar.xz
ceph-fe1dec424a21dc2e8202d9aadac91fc98fcec87e.zip
ptl-tool.py: move githubmap update into merge commit
Otherwise Github will reject the push because one commit is not part of the PR (and "untested"). Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
Diffstat (limited to 'src/script')
-rwxr-xr-xsrc/script/ptl-tool.py14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/script/ptl-tool.py b/src/script/ptl-tool.py
index 397bb747281..39f1141f875 100755
--- a/src/script/ptl-tool.py
+++ b/src/script/ptl-tool.py
@@ -295,22 +295,16 @@ def build_branch(args):
for indication in indications:
message = message + indication + "\n"
+ G.git.merge(tip.hexsha, '--no-ff', m=message)
+
if new_new_contributors:
# Check out the PR, add a commit adding to .githubmap
- HEAD = G.head.commit
- log.info("adding new contributors to githubmap on top of PR #%s" % pr)
- G.head.reset(commit=tip, index=True, working_tree=True)
+ log.info("adding new contributors to githubmap in merge commit")
with open(".githubmap", "a") as f:
for c in new_new_contributors:
f.write("%s %s\n" % (c, new_new_contributors[c]))
G.index.add([".githubmap"])
- G.git.commit("-s", "-m", "githubmap: update contributors")
- c = G.head.commit
- G.head.reset(HEAD, index=True, working_tree=True)
- else:
- c = tip
-
- G.git.merge(c.hexsha, '--no-ff', m=message)
+ G.git.commit("--amend", "--no-edit")
if label:
req = requests.post("https://api.github.com/repos/{project}/{repo}/issues/{pr}/labels".format(pr=pr, project=BASE_PROJECT, repo=BASE_REPO), data=json.dumps([label]), auth=(USER, PASSWORD))