{"id":17736580,"url":"https://github.com/toshimaru/backlog-pr-link-action","last_synced_at":"2025-05-08T20:36:05.448Z","repository":{"id":36977689,"uuid":"289580120","full_name":"toshimaru/backlog-pr-link-action","owner":"toshimaru","description":"Link GitHub Pull Request to Backlog issue.","archived":false,"fork":false,"pushed_at":"2025-05-04T00:52:55.000Z","size":4832,"stargazers_count":5,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-04T01:21:10.870Z","etag":null,"topics":["github-actions"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/backlog-pull-request-link-action","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/toshimaru.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"toshimaru"}},"created_at":"2020-08-22T23:00:25.000Z","updated_at":"2025-05-04T00:52:57.000Z","dependencies_parsed_at":"2023-09-28T04:46:43.105Z","dependency_job_id":"e3e01dbc-ed41-4327-8378-5f3df52a389a","html_url":"https://github.com/toshimaru/backlog-pr-link-action","commit_stats":{"total_commits":336,"total_committers":2,"mean_commits":168.0,"dds":"0.25595238095238093","last_synced_commit":"3c843897e0b2ca691592ecf36fac2cb27be34f29"},"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toshimaru%2Fbacklog-pr-link-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toshimaru%2Fbacklog-pr-link-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toshimaru%2Fbacklog-pr-link-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toshimaru%2Fbacklog-pr-link-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/toshimaru","download_url":"https://codeload.github.com/toshimaru/backlog-pr-link-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253146422,"owners_count":21861400,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github-actions"],"created_at":"2024-10-26T00:23:32.821Z","updated_at":"2025-05-08T20:36:05.377Z","avatar_url":"https://github.com/toshimaru.png","language":"TypeScript","funding_links":["https://github.com/sponsors/toshimaru"],"categories":[],"sub_categories":[],"readme":"[![Test](https://github.com/toshimaru/backlog-pr-link-action/actions/workflows/test.yml/badge.svg)](https://github.com/toshimaru/backlog-pr-link-action/actions/workflows/test.yml)\n\n# backlog-pr-link-action\n\nGitHub Actions: Link GitHub Pull Request to [Backlog](https://backlog.com/) issue.\n\n## Prerequisite\n\n- Backlog **Premium** plan (ref. [Backlog Pricing](https://backlog.com/pricing/))\n- Create custom field named **\"Pull Request\"** in Backlog issue\n\n## Usage\n\n```yml\n# .github/workflows/backlog-pr-link.yml\nname: 'Link PR to Backlog'\n\non:\n  pull_request:\n    types: [opened, edited]\n\njobs:\n  backlog-pr-link:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: toshimaru/backlog-pr-link-action@v2.1.1\n        with:\n          backlog-api-key: \"${{ secrets.BACKLOG_API_KEY }}\"\n          backlog-host: \"your-org.backlog.com\"\n```\n\n### Tips: Avoiding unnecessary runs\n\nIf the pull request doesn't contain a Backlog URL, no need to run this action.\n\nTo avoid this situation, you can skip the job by using `if` expression as follows:\n\n```yml\n# Run the job only when the pull request contains a Backlog URL\njobs:\n  backlog-pr-link:\n    runs-on: ubuntu-latest\n    if: contains(github.event.pull_request.body, 'https://yourhost.backlog.com/')\n    steps:\n      - ...\n```\n\n## How it works\n\n- Check the pull request has a Backlog issue URL when it's opened or edited\n- If it has the URL, link GitHub PR to Backlog issue\n\n## Setup\n\n### 1. Create a custom field named `Pull Request`\n\n- Custom Field: `Pull Request`\n- Custom Field Type: `Sentence`\n\n\u003cdetails\u003e\n  \u003csummary\u003eImage: Create a custom field\u003c/summary\u003e\n\n![create custom field](https://user-images.githubusercontent.com/803398/93299287-c5913280-f82f-11ea-8e88-6d535390b4d3.png)\n\n\u003c/details\u003e\n\n#### Reference\n\n- [English] [Setting Custom fields - Backlog Enterprise](https://backlog.com/enterprise-help/usersguide/custom-field/userguide1099/)\n- [Japanese] [カスタム属性の設定方法 – Backlog ヘルプセンター](https://support-ja.backlog.com/hc/ja/articles/360035640274-%E3%82%AB%E3%82%B9%E3%82%BF%E3%83%A0%E5%B1%9E%E6%80%A7%E3%81%AE%E8%A8%AD%E5%AE%9A%E6%96%B9%E6%B3%95)\n\n### 2. Generate Backlog API key\n\n- Go to Backlog API Settings page\n- Generate API key for the action\n\n\u003cdetails\u003e\n  \u003csummary\u003eImage: Generate Backlog API key\u003c/summary\u003e\n\n![generate backlog api key](https://user-images.githubusercontent.com/803398/94165479-3b973880-fec5-11ea-915d-733d0de6631f.png)\n\n\u003c/details\u003e\n\n#### Reference\n\n- [English] [API Settings – Backlog Help Center](https://support.backlog.com/hc/en-us/articles/115015420567-API-Settings)\n- [Japanese] [APIの設定 – Backlog ヘルプセンター](https://support-ja.backlog.com/hc/ja/articles/360035641754)\n\n### 3. Set API key to GitHub Secret\n\n- Go to GitHub Actions secrets page\n- Add GitHub Repository secret\n  - secret name: `BACKLOG_API_KEY`\n  - secret value: {your-backlog-api-key}\n\n\u003cdetails\u003e\n  \u003csummary\u003eImage: Set API key to GitHub Secret\u003c/summary\u003e\n\n![GitHub Repository secret](https://user-images.githubusercontent.com/803398/161873040-5e54361a-6498-4866-9562-b23151aa3666.png)\n\n\u003c/details\u003e\n\n#### Reference\n\n- [Encrypted secrets - GitHub Docs](https://docs.github.com/en/actions/reference/encrypted-secrets)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoshimaru%2Fbacklog-pr-link-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoshimaru%2Fbacklog-pr-link-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoshimaru%2Fbacklog-pr-link-action/lists"}