2021-07-05 14:58:55 +00:00
|
|
|
#!/usr/bin/env bash
|
2021-07-05 23:45:49 +00:00
|
|
|
## open_pr Opens PR to Spacemacs repository with updates (if any)
|
2021-07-05 14:58:55 +00:00
|
|
|
##
|
|
|
|
## Copyright (c) 2014-2021 Sylvain Benner & Contributors
|
|
|
|
##
|
|
|
|
## Author: Eugene Yaremenko
|
|
|
|
## URL: https://github.com/syl20bnr/spacemacs
|
|
|
|
##
|
|
|
|
## This file is not part of GNU Emacs.
|
|
|
|
##
|
|
|
|
## License: GPLv3
|
|
|
|
|
2021-08-01 20:34:01 +00:00
|
|
|
exit_if_no_patchfile
|
2021-07-05 23:45:49 +00:00
|
|
|
|
2021-07-05 22:43:19 +00:00
|
|
|
cd "/tmp/${PUBLISH}"
|
|
|
|
|
2021-07-05 22:08:23 +00:00
|
|
|
export GITHUB_TOKEN=$UPD_BOT_GIT_TK
|
2021-07-07 10:25:03 +00:00
|
|
|
echo_headline "Opening PR"
|
2021-07-07 13:52:34 +00:00
|
|
|
echo "[bot] ${PUBLISH}" > msg
|
2021-07-05 14:58:55 +00:00
|
|
|
echo >> msg
|
|
|
|
echo "Merge with care - I'm just a stupid bot. Beep boop." >> msg
|
2021-07-07 10:25:03 +00:00
|
|
|
hub pull-request -h "${PUBLISH}" -b "${PR_BRANCH}" -F msg
|
2021-07-05 14:58:55 +00:00
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
echo "Seems like PR already exists (not a problem)"
|
|
|
|
fi
|