This is GitHub Actions that move the open-issue described in the "Issue" paragraph to a specific project column.
The supported action webhook events are issues
| pull_request
.
Note: The development is primarily focused on
closed
events, so it may not work with certain event triggers.
example .github/workflows/auto-move-related-issue.yml
name: "Auto move related issue"
on:
pull_request:
types: [closed]
jobs:
auto-move-related-issue:
runs-on: ubuntu-latest
steps:
- uses: 1natsu172/github-action-auto-move-related-issue@v1
id: auto-move-related-issue_action
with:
# github_token: "${{ secrets.GITHUB_TOKEN }}"
config: "auto-move-related-issue-config.yml"
・Tips
If you only want to run the pull_request on merged, you can write the steps configuration as follows.
steps:
- uses: 1natsu172/github-action-auto-move-related-issue@v1
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true
id: auto-move-related-issue_action
with:
# github_token: "${{ secrets.GITHUB_TOKEN }}"
config: "auto-move-related-issue-config.yml"
・ with
options
name | description | default | required | e.g. |
---|---|---|---|---|
config | Config file name | auto-move-related-issue-config.yml |
true | move-related-issue-on-merged.yml |
github_token | Access token | ${{github.token}} |
true | ${{secrets.ACCESS_TOKEN}} |
example .github/auto-move-related-issue-config.yml
projectName: "kanban1"
columnName: "Review in progress"
This action support single project and single column target.
Must write Issue
paragraph and Issue or PullRequest number or url
example
# Issue
#1
#3
https://github.com/sushi-kun/github-projects-lab/issues/5
# Summary
.
.
.
According to the image below.
Only the Issue or PullRequest number or url in the issue paragraph will be targeted. It also ignores issues that have been given keywords to close.
Support for Issue or PullRequest that has not been added to the target project. It is automatically added to the target column even if it has not been added to the project.
Do you have any extra information in your Issue paragraph other than a number or URL? It is recommended to describe Issue paragraph as simply as possible, with only the number and URL.
eventName | action types |
---|---|
issues | any |
pull_request | any |
Use SemVer for versioning. For the versions available, see the tags on this repository.
MIT © 1natsu172
The presence or absence of the v
prefix is intentional.
v1 = "^1.0.0"
1.0.0 = "1.0.0"
Whenever release, must release the new version(non-v-prefix) and major version release(has-v-prefix).
ref: https://github.com/actions/toolkit/blob/master/docs/action-versioning.md
Release by GUI operation according to the official publishing-action guide.
Be careful: specific version release tag is non-v-prefix
And then, update existing major version tag by local push.
git checkout master
git tag -fa v1 -m "Update v1 tag"
git push origin v1 --force