Skip to content

Feature Request |trigger action on "Pull Request Approved" #25372

Answered by weide-zhou
alexhraber asked this question in Actions
Discussion options

You must be logged in to vote

Hi @everops-alex ,

Thanks for your sharing. The native solution you provided works perfectly(trigger with ‘pull_request_review: submitted’ event and check ‘github.event.review.state’ value if it’s ‘approved’)! 

And it’s recommended to check the value in job level within if expression, it will skip unneccessary jobs to be started.

on:
  pull_request_review:
    types: [submitted]

jobs:
build:
if: github.event.review.state == 'approved'
runs-on: ubuntu-latest
steps: ...

Regarding the first class citizen feature_request, please raise a ticket here according to the policy, github product manager will take a review and help to confirm.

Cheers!

Replies: 5 comments 8 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
6 replies
@niall-shaw
Comment options

@ADTC
Comment options

@FrostDNA
Comment options

@ADTC
Comment options

@FrostDNA
Comment options

Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@FrostDNA
Comment options

@ADTC
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement An idea, feature request, or improvement to a GitHub feature Actions Build, test, and automate your deployment pipeline with world-class CI/CD Product Feedback
8 participants