Add auto make merge (#660)

This commit is contained in:
Jules Lasne (jlasne) 2019-04-08 09:54:47 +02:00 committed by Julien Palard
parent 9e2cca272d
commit 3cd2a5efee
1 changed files with 21 additions and 0 deletions

21
make-merge.sh Executable file
View File

@ -0,0 +1,21 @@
#!/usr/bin/env bash
rm -rf /tmp/cpython
git clone --depth 1 --branch 3.7 --single-branch https://github.com/python/cpython /tmp/cpython
CPYTHON_LATEST_SHA=$(git -C /tmp/cpython rev-parse --short HEAD)
git checkout -b make-merge-$CPYTHON_LATEST_SHA
sed -i "s/COMMIT=[a-z0-9]*/COMMIT=$CPYTHON_LATEST_SHA/" .travis.yml
make merge
pip install -U pyhub-pr
git add -A
git commit -m "merge pot files."
git push --set-upstream origin make-merge-$CPYTHON_LATEST_SHA
pyhub_pr --organisation python --repo python-docs-fr --token $GITHUB_TOKEN --title "Merge from upstream doc" --body "This PR was created from the command line with pyhub-pr." --head $TOKEN_OWNER_USERNAME:make-merge-$(git rev-parse --short HEAD)