Skip to content
This repository was archived by the owner on Jul 9, 2026. It is now read-only.
Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Important

This project has been archived and is no longer actively maintained. As announced in v2.4.0, this was planned as the final release by the current maintainer. If you are interested in taking over maintenance, please contact @toshimaru.

Test

backlog-pr-link-action

GitHub Actions: Link GitHub Pull Request to Backlog issue.

Prerequisite

  • Backlog Premium plan (ref. Backlog Pricing)
  • Create custom field named "Pull Request" in Backlog issue

Usage

# .github/workflows/backlog-pr-link.yml
name: 'Link PR to Backlog'

on:
  pull_request:
    types: [opened, edited]

jobs:
  backlog-pr-link:
    runs-on: ubuntu-latest
    steps:
      - uses: toshimaru/backlog-pr-link-action@v2.3.0
        with:
          backlog-api-key: "${{ secrets.BACKLOG_API_KEY }}"
          backlog-host: "your-org.backlog.com"

Tip

Avoiding unnecessary runs

If the pull request doesn't contain a Backlog URL, there's no need to run this action.

To avoid this situation, you can skip the job by using an if expression as follows:

# Run the job only when the pull request contains a Backlog URL
jobs:
  backlog-pr-link:
    runs-on: ubuntu-latest
    if: contains(github.event.pull_request.body, 'https://yourhost.backlog.com/')
    steps:
      - ...

How it works

  • Check the pull request has a Backlog issue URL when it's opened or edited
  • If it has the URL, link GitHub PR to Backlog issue

Setup

1. Create a custom field named Pull Request

  • Custom Field: Pull Request
  • Custom Field Type: Sentence
Image: Create a custom field

create custom field

Reference

2. Generate Backlog API key

  • Go to Backlog API Settings page
  • Generate API key for the action
Image: Generate Backlog API key

generate backlog api key

Reference

3. Set API key to GitHub Secret

  • Go to GitHub Actions secrets page
  • Add GitHub Repository secret
    • secret name: BACKLOG_API_KEY
    • secret value: {your-backlog-api-key}
Image: Set API key to GitHub Secret

GitHub Repository secret

Reference

Releases

Sponsor this project

Packages

Used by

Contributors

Languages