Linked Issue (Github Action)

This action find the Issues linked in a Pull Request. It parses the HTML of the PR page to find the linked issues.


The action has the following inputs:

Name Description Type Possible Values Default Values
pr_url URL of the Pull Request Required Any valid PR URL ""
tag HTML tag that contains the linked Issue URL Optional Any HTML Tag form
attr_key Attribute key that will be used to select the desired HTML tag Optional Any valid HTML tag attribute aria-label
attr_val Attribute value that will be used to select the desired HTML tag Optional Any text Link issues
format Output format for the linked Issues Optional IssueNumber,IssueURL,ExternalIssueRef IssueNumber


The action has the following output:

Name Description
issues List of issues separated by space and formatted according to format input

For example, if your PR has the following issue linked:

The output of this action will be the following for different formats:

1 2 3



foo/bar#1 foo/bar#2 foo/bar#3

Example usage

Here, is a sample workflow YAML showing how to use this action.

on: [pull_request]

    runs-on: ubuntu-latest
    name: A job to say hello
      - name: Find Linked Issues
        id: links
        uses: hossainemruz/[email protected]
          pr_url: ${{github.event.pull_request.html_url}}
          format: IssueNumber

      - name: Output linked Issue list
        run: echo "${{ steps.links.outputs.issues }}"

A more practical use of this action can be found in this workflow.


View Github