You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This action can be used to try to match the current commit of the running
workflow to a closed (merged) pull request. This can be useful for workflows
where you need information about the pull request that was just merged but can't
use the pull_request event due to the limitations around the event.
Inputs
Name
Required
Default
Description
token
no
${{ github.token }}
GitHub token to use for API requests.
page-limit
no
1
The maximum number of pages to search for a matching pull request.
Outputs
Name
Description
number
The number of the pull request that was merged.
title
The title of the pull request that was merged.
body
The body of the pull request that was merged.
labels
The labels of the pull request that was merged, separated by commas.
labels-json
The labels of the pull request that was merged, in JSON format.
user
The user that opened the pull request that was merged.
assignees
The assignees of the pull request that was merged, separated by commas.
assignees-json
The assignees of the pull request that was merged, in JSON format.
milestone
The milestone of the pull request that was merged.
merged_by
The user that merged the pull request that was merged.
Example usage
- name: Get merged pull requestid: mergeduses: benlei/find-merged-pull-request@v1with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Send a message if the merged pull request contains a 'fix' labelif: ${{ contains(fromJSON(steps.merged.outputs.labels-json), 'fix') }}run: echo "The merged pull request contains a 'fix' label."