Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kentaro-m/add-an-issue-reference-action
:octocat: A GitHub Action for adding a related issue reference to a pull request.
https://github.com/kentaro-m/add-an-issue-reference-action
actions github github-actions my-portfolio
Last synced: 3 months ago
JSON representation
:octocat: A GitHub Action for adding a related issue reference to a pull request.
- Host: GitHub
- URL: https://github.com/kentaro-m/add-an-issue-reference-action
- Owner: kentaro-m
- License: mit
- Created: 2019-02-02T15:23:32.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-04-10T01:38:14.000Z (almost 3 years ago)
- Last Synced: 2024-10-15T13:32:03.433Z (3 months ago)
- Topics: actions, github, github-actions, my-portfolio
- Language: TypeScript
- Size: 859 KB
- Stars: 18
- Watchers: 3
- Forks: 19
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Add an issue reference
A GitHub Action for adding a related issue reference to a pull request.## :arrow_forward: Usage
A workflow adds a comment contained a link for a related issue based on the branch name to a pull request when a pull request is opened.![Adds a comment contained a link for a related issue](usage.png)
### Create a workflow
Add `.github/workflows/issue-reference.yml` with the following:
```yml
name: 'Issue Reference'
on:
pull_request:
types: [opened]jobs:
issue-reference:
runs-on: ubuntu-latest
steps:
- uses: kentaro-m/[email protected]
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
branch-prefix: "TICKET-"
```### Set up required parameters
Need to contain the required parameters on the workflow file.- `repo-token` A token for the repository. Can be passed in using `{{ secrets.GITHUB_TOKEN }}`
- `branch-prefix` A prefix of the branch name for finding a related issue (e.g `TICKET-`).### Add a comment contained a link for a related issue
Create a branch based on the pattern of the branch name (`[branch prefix][issue number]`) set up on `.github/workflows/issue-reference.yml`.For example, if `branch-prefix` is `TICKET-`, create a branch like `TICKET-8`.
When pushing your changes to the repository and creating a pull request, a workflow runs automatically.
## :memo: Licence
MIT