Run workflow after pushing changes to a PR #25796
-
One of my workflows is set to run like this
The workflow runs correctly after I request a review on the PR. However, when I need to fix something on the PR, make the necessary changes locally and push it to remote, the workflow is not triggered. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Hi Peter, If you make some changes to the files(eg: resolve conflicts), push to github, please use type ‘synchronize ’ for pull request to trigger the workflow, it works on my side, code as below:
For type ‘edited’, I tried to use rest api locally to update Pull request(please refer to https://developer.github.com/v3/pulls/#update-a-pull-request), it’s successful to trigger the workflow. Checked the pull request content from API result, you will find the file update/new commit is not included. |
Beta Was this translation helpful? Give feedback.
-
Ok thanks! So type ‘edited’ is only triggered when updating PR title, body, state or base? |
Beta Was this translation helpful? Give feedback.
-
Yes, the ‘edited’ type is triggered when updating PR itself, including title, body, state, base, and other stuff. Details we can check the PR content from API result for confirmation, thanks. |
Beta Was this translation helpful? Give feedback.
-
it seems that edited is no longer working consistently. I made it work 2 times in a row, then I edit the title a third time and it stopped working without changing anything. I opened a PR to ask for help but it would be good ifyou guys could fix it asap.
Action not being triggered when editing PR title or description
**Describe the bug** Yesterday I was able to trigger actions when editing PR ti…tle or description (body). Later in the same day it stopped! And there is no issue reported in the Github Status website. This is my action: name: Bump Version Workflow
on:
pull_request:
types: [opened, synchronize, edited, ready_for_review]
branches:
- main
workflow_dispatch:
jobs:
get-mulesoft-apps:
name: Get Mulesoft Apps
uses: VodafoneIS/mulesoft/.github/workflows/get-mulesoft-apps.yml@main
bump-version:
name: bump version
needs: get-mulesoft-apps
runs-on: ubuntu-latest
container:
image: ghcr.io/vodafoneis/mulesoft-build-image:main
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
strategy:
matrix:
MULESOFT_APP: ${{ fromJson(needs.get-mulesoft-apps.outputs.MULESOFT_APPS) }}
defaults:
run:
working-directory: ${{ matrix.MULESOFT_APP }}
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: print app name
run: echo ${{ matrix.MULESOFT_APP }}
- uses: fregante/setup-git-user@v1
- name: set bump type
id: get-bump-type
run: |
bump_type=$(/scripts/get_bump_type.sh -a ${{ matrix.MULESOFT_APP }} -t ${{ github.event.pull_request.title }} -b ${{ github.event.pull_request.body}})
echo "::set-output name=BUMP_TYPE::$bump_type"
- name: bump version
run: /scripts/bump_version.sh -a ${{ matrix.MULESOFT_APP }} -b ${{ steps.get-bump-type.outputs.BUMP_TYPE }}
To Reproduce
Expected behavior pull_request: Runner Version and Platformubuntu-latest OS of the machine running the runner? OSX/Windows/Linux/... What's not working?Github seems to not dispatch PR edit events to start Github Actions Job Log OutputN/A Runner and Worker's Diagnostic LogsN/A |
Beta Was this translation helpful? Give feedback.
Hi Peter,
If you make some changes to the files(eg: resolve conflicts), push to github, please use type ‘synchronize ’ for pull request to trigger the workflow, it works on my side, code as below:
For type ‘edited’, I tried to use rest api locally to update Pull request(please refer to https://developer.github.com/v3/pulls/#update-a-pull-request), it’s successful to trigger the workflow.
Checked the pull request content from API result, you will find the file update/new commit is not included.