8000 Add auto make merge by Seluj78 · Pull Request #660 · python/python-docs-fr · GitHub
[go: up one dir, main page]

Skip to content

Add auto make merge #660

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 8, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Final version of script
  • Loading branch information
Seluj78 committed Apr 5, 2019
commit 5e960f643cb460262cde06cd105485796e3ac014
14 changes: 9 additions & 5 deletions make-merge.sh
Original file line number Diff line number Diff line change
@@ -1,17 +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

# TODO: venv ?
pip install pyhub-pr
CPYTHON_LATEST_SHA=$(git -C /tmp/cpython rev-parse --short HEAD)

git checkout -b make-merge-$CPYTHON_LATEST_SHA

git checkout -b make-merge-$(git rev-parse --short HEAD)
sed -i "s/COMMIT=[a-z0-9]*/COMMIT=$CPYTHON_LATEST_SHA/" .travis.yml

make merge

# TODO: Configure git with correct credentials + config file
pip install pyhub-pr

git add -A

git commit -m "Merged upstream pot files into this branch"

git push --set-upstream origin make-merge-$(git rev-parse --short HEAD)
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)
0