Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Pilot Lvl 1
Message 1 of 3

How to determine which milestone was closed

Solved! Go to Solution.

Working on an action that will run when a milestone is closed. But I currently have no way to determine which milestone the action was triggered for. Unless I missed something in the documentation. Does anyone have pointers or a way to resolve this?

2 Replies
Solution
GitHub Staff
Message 2 of 3

Re: How to determine which milestone was closed

Please see https://help.github.com/en/articles/events-that-trigger-workflows#milestone-event-milestone for information on how to only trigger when the milestone is closed.

 

As part of the context you have access to the full event payload, for milestone you can find those details in the events and payloads documentation https://developer.github.com/v3/activity/events/types/#milestoneevent.  To access the milestone title, for example, you could use ${{ github.event.milestone.title }}.  You can also access the payload on disk by reading the file located at $GITHUB_EVENT_PATH.

Pilot Lvl 1
Message 3 of 3

Re: How to determine which milestone was closed

Cheers! Didn't realise the entire event was available through `${{ github.event }}`. Thank you for your help :+1: