-
Notifications
You must be signed in to change notification settings - Fork 59
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
Workflow doesn't trigger on labeled pull request #11
Comments
Hello @jgonggrijp, thanks for the issue. I have done some tests, the event never fires the workflow, it seems that the labeled event in a pull request does not allow filtering branches. Without the branch filter should be work. Example: name: Prepublication staging
on:
pull_request:
types: [labeled]
# branches:
# - release/*
# - hotfix/*
jobs:
stage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Merge into prepublish
uses: devmasx/[email protected]
with:
label_name: ready to launch
target_branch: prepublish
github_token: ${{ secrets.GITHUB_TOKEN }} I will try to investigate a little more because it does not work with the branch filter, However, using conditions in the job should be work. Example: name: Prepublication staging
on:
pull_request:
types: [labeled]
jobs:
stage:
if: contains(github.ref, 'refs/release/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Merge into prepublish
uses: devmasx/[email protected]
with:
label_name: ready to launch
target_branch: prepublish
github_token: ${{ secrets.GITHUB_TOKEN }} |
Gratefully using the solution from devmasx/merge-branch#11 (comment)
Thanks for taking up on this @MiguelSavignano! I adopted your helpful suggestion to use If you could shine your light on this again, that would be great. |
@jgonggrijp, I was wrong the value of if: contains(github.event.pull_request.head.ref, 'release/') || contains(github.event.pull_request.head.ref, 'hotfix/') I think it is a very common use case and it would be good to add it to the README; If it works for you; can you make a Pull request with it? |
Gratefully using the updated solution from devmasx/merge-branch#11 (comment)
Thanks again. The job is now being run, we're getting closer! But the action is failing. There is a lot of output, it appears that some GitHub API is running into an internal server error. Can you make sense of it? https://github.com/documentcloud/underscore-contrib/pull/238/checks?check_run_id=1573771108 |
This may or may not be an issue with the merge-branch action; I thought I'd try here before contacting GitHub.
I'm trying to set up a workflow where, when the "ready to launch" label is set on a pull request for a
release/*
branch, the branch in question is merged into another branch calledprepublish
. This workflow is defined here. It was inspired on the documentation.I have made three failed attempts at triggering this workflow:
master
yet)Either I'm misunderstanding how to do this, or something doesn't work as advertised in merge-branch or in the GH Actions API. Can you help me? Thanks in advance!
The text was updated successfully, but these errors were encountered: