This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
spacemacs/.circleci/update/maybe_pr

26 lines
641 B
Text
Raw Normal View History

#!/usr/bin/env bash
## open_pr Opens PR to Spacemacs repository with updates (if any)
##
## 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
cd "/tmp/${PUBLISH}"
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
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
if [ $? -ne 0 ]; then
echo "Seems like PR already exists (not a problem)"
fi