Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
user-plus

GitHub Action

Backlog Pull Request Link Action

v2.1.0

Backlog Pull Request Link Action

user-plus

Backlog Pull Request Link Action

Link the Pull Request to Backlog issue

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Backlog Pull Request Link Action

uses: toshimaru/[email protected]

Learn more about this action in toshimaru/backlog-pr-link-action

Choose a version

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/[email protected]
        with:
          backlog-api-key: "${{ secrets.BACKLOG_API_KEY }}"
          backlog-host: "your-org.backlog.com"

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