feat: add PR support (#49)

* feat: add PR support

* add debug steps

* fix: use console

* fix: fix buil error

* [auto] build: update compiled version

* fix: better branch handling

* [auto] build: update compiled version

* chore: remove debug steps

* fix: fetch author using GitHub API when in PR

* [auto] build: update compiled version

* feat: extend API functionality to non-PR runs

* [auto] build: update compiled version
This commit is contained in:
Federico Grandi
2020-07-31 20:47:38 +02:00
committed by GitHub
parent d5f44e7aeb
commit 27a89ad786
6 changed files with 86 additions and 34 deletions

View File

@@ -52,15 +52,9 @@ if ! git diff --cached --quiet --exit-code; then
git fetch
# Verify if the branch needs to be created
if ! git rev-parse --verify --quiet "$INPUT_REF"; then
echo "Creating branch..."
git branch "$INPUT_REF"
fi
# Switch to branch from current workflow run
echo "Switching branch..."
git checkout "$INPUT_REF"
# Switch branch (create a new one if it doesn't exist)
echo "Switching/creating branch..."
git checkout "$INPUT_REF" 2>/dev/null || git checkout -b "$INPUT_REF"
echo "Pulling from remote..."
git fetch && git pull

File diff suppressed because one or more lines are too long