TODO NUKEM - PR Ticket Link Action

March 31, 2026 ยท View on GitHub

Automatically adds ticket links to Pull Request descriptions based on branch names.

Quick Setup

Create .github/workflows/todo-nukem-pr-ticket-link.yml in your project:

name: TODO NUKEM - Add Ticket Link to PR

on:
  pull_request:
    types: [opened]

jobs:
  add-ticket-link:
    runs-on: ubuntu-latest
    permissions:
      pull-requests: write
      contents: read
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Add ticket link to PR
        uses: jolution/todo-nukem-pr-ticket-link@v1
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}

Configuration

Add ticketBaseUrl to your package.json:

{
  "todonukem": {
    "ticketBaseUrl": "https://jira.example.com/browse/"
  }
}

Or create a .todonukem.json file (overrides package.json):

{
  "ticketBaseUrl": "https://your-company.atlassian.net/browse/"
}

Optional: Ticket Prefix

Add a ticketPrefix to display a system-specific prefix in the ticket reference (prefix is only used for display, not in the URL):

{
  "ticketBaseUrl": "https://dev.azure.com/myorg/myproject/_workitems/edit/",
  "ticketPrefix": "AB#"
}

Examples:

  • Azure DevOps with auto-linking (Learn more):

    - name: Add ticket link to PR
      uses: jolution/todo-nukem-pr-ticket-link@v1
      with:
        github-token: ${{ secrets.GITHUB_TOKEN }}
        linkStyle: plaintext
    
    { "ticketPrefix": "AB#" }
    

    Branch: feature/AB-1234-my-feature โ†’ Shows: [ ๐ŸŽซ AB#1234 ] (auto-linked by Azure DevOps)

  • Azure DevOps with explicit link:

    {
      "ticketBaseUrl": "https://dev.azure.com/myorg/myproject/_workitems/edit/",
      "ticketPrefix": "AB#"
    }
    

    Branch: feature/AB-1234-my-feature โ†’ Shows: [ ๐ŸŽซ [AB#1234](...) ]

  • JIRA, Linear, or others (default, no prefix):

    {
      "ticketBaseUrl": "https://jira.example.com/browse/"
    }
    

    Branch: feature/PROJ-1234-my-feature โ†’ Shows: [ ๐ŸŽซ [1234](...) ]

Branch Naming

Your branch names must contain a ticket ID:

  • โœ… feature/PROJ-123
  • โœ… fix/TICKET-456
  • โœ… PROJ-789-refactor
  • โŒ feature/my-feature (no ticket ID)

Result

Appends a footer to the PR description. The exact format depends on linkStyle:

markdown (default)

---

<!-- TODO NUKEM PR Ticket Link -->

[ ๐ŸŽซ [PROJ-123](https://jira.example.com/browse/PROJ-123) ]

_via [TODO NUKEM](https://github.com/jolution/todo-nukem)_

plaintext (e.g. for Azure DevOps auto-linking)

---

<!-- TODO NUKEM PR Ticket Link -->

[ ๐ŸŽซ AB#123 ]

_via [TODO NUKEM](https://github.com/jolution/todo-nukem)_

The HTML comment acts as a marker to prevent duplicate entries on subsequent runs.

Inputs

NameDescriptionRequiredDefault
github-tokenGitHub token for API accessYes${{ github.token }}
hidePromotionHide the 'via TODO NUKEM' promotion linkNofalse
linkStyleFormat of the ticket reference: markdown (Markdown hyperlink) or plaintext (plain text, e.g. for Azure DevOps auto-linking)Nomarkdown