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/maybe_pr
2021-07-08 05:30:06 -07:00

25 lines
639 B
Bash
Executable file

#!/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
exit_if_no_changes
cd "/tmp/${PUBLISH}"
export GITHUB_TOKEN=$UPD_BOT_GIT_TK
echo_headline "Opening PR"
echo "[bot] ${PUBLISH}" > msg
echo >> msg
echo "Merge with care - I'm just a stupid bot. Beep boop." >> msg
hub pull-request -h "${PUBLISH}" -b "${PR_BRANCH}" -F msg
if [ $? -ne 0 ]; then
echo "Seems like PR already exists (not a problem)"
fi