Hello,
I have a very simple scenario where I want to execute specific action (Just write a comment in the PR itself) when branch name starts with specific characters.
In the GH documentation it says that github.ref
holds that information. But it does not. My PR is ave-123-add-links
but output of gihub.ref
is refs/pull/202/merge
. This has nothing to do with my branch name and I do not understand what am I doing wrong.
Here is the full example:
name: Add links
on: pull_request
jobs:
build:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/heads/ave-') # This will fail always, it has no ave-, it is set to refs/pull/202/merge
steps:
- run: ehco ${{ github.ref }} # refs/pull/202/merge ?