Skip to content

Commit 368b47f

Browse files
feat: add create-project-card and move-project-card helpers (#25)
1 parent 4014043 commit 368b47f

28 files changed

+3326
-1298
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Create Project Card
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
paths:
7+
- 'src/helpers/create-project-card.ts'
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
16+
- uses: ./
17+
with:
18+
helper: create-project-card
19+
project_name: 'test project'
20+
project_destination_column_name: 'test column 1'
21+
pull_number: ${{ github.event.pull_request.number }}
22+
github_token: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Move Project Card
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
paths:
7+
- 'src/helpers/move-project-card.ts'
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
16+
- uses: ./
17+
with:
18+
helper: move-project-card
19+
project_name: 'test project'
20+
project_origin_column_name: 'test column 1'
21+
project_destination_column_name: 'test column 2'
22+
pull_number: ${{ github.event.pull_request.number }}
23+
github_token: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ Each of the following helpers are defined in a file of the same name in `src/hel
1313
### [**assign-pr-reviewers**](.github/workflows/assign-pr-reviewers.yml)
1414
* Randomly assigns members of a github team to review a PR. If `login` is provided, it does nothing if that user is already part of the team
1515
* You can also pass a `slack_webhook_url` to notify the assignees that they are assigned to the PR!
16+
### [**create-project-card**](.github/workflows/create-project-card.yml)
17+
* Creates a Project card into your GitHub Project repository by providing a `project_name` and `project_destination_column_name` in which the card should be created.
18+
* If `note` is provided, it will add that information into the card. If it is not provided, it will use the PR information details to populate it.
19+
* Useful when opening a pull request and want to track its information details into a GitHub Project.
20+
### [**move-project-card**](.github/workflows/move-project-card.yml)
21+
* Moves a GitHub Project card to a new column, using the `project_origin_column_name` and`project_destination_column_name` you provide.
22+
* In order to move a card from one place to another, it must already exist.
1623
### [**auto-approve-pr**](.github/workflows/auto-approve-pr.yml)
1724
* Automatically approves a PR if the reviewer's login matches the provided login
1825
### [**check-pr-title**](.github/workflows/check-pr-title.yml)

action.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,18 @@ inputs:
1313
pull_number:
1414
description: 'The pull request number'
1515
required: false
16+
project_name:
17+
description: 'The GitHub Project name'
18+
required: false
19+
project_destination_column_name:
20+
description: 'The name of the column that the card should be created or moved to'
21+
required: false
22+
note:
23+
description: 'The body text that should be added into a Project Card'
24+
required: false
25+
project_origin_column_name:
26+
description: 'The name of the column from where the card should be taken'
27+
required: false
1628
sha:
1729
description: 'The commit hash'
1830
required: false

dist/118.index.js

Lines changed: 265 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)