Skip to content
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

Use basename to split status URL in automerge script #469

Merged
merged 15 commits into from
Jan 8, 2024
4 changes: 3 additions & 1 deletion .github/workflows/automerge_plugin-only_prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ jobs:
with:
fetch-depth: 0
- name: Get SHA of last commit on PR branch
env:
EVENT_URL: ${{ github.event.url }}
run: |
if [[ ${{ github.event_name }} == "status" ]]; then
echo "TRIGGER_SHA=${{ github.event.url##*/ }}" >> $GITHUB_ENV
echo "TRIGGER_SHA=$( basename $EVENT_URL )" >> $GITHUB_ENV
else
echo "TRIGGER_SHA=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV
fi
Expand Down