Skip to content

Commit 82bf8e6

Browse files
authored
feat: Project cards automatically move when labels are updated (#911)
* feat: Set up automatic labels Using github actions, set up automatic labeling. * feat Add a set of label rules * feat Update changelog * feat Add the name of the token secret * feat correct the name of the file * feat Adjust globbing patterns * feat Try adding pathing * feat Rework syntax in labeler * feat add needs changelog hook * feat test changelog feature * feat Remove changelog label * feat Add config for moving cards when labels are changed * Update labeler.yml * feat this only works on issue cards; not pull requests * feat Try a different package * feat Add label * feat Add blocked rules * feat Add in the rest of the logic for organizing issues
1 parent 2af5366 commit 82bf8e6

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

.github/workflows/project.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Move card in project view when label updated
2+
on: [issues, pull_request]
3+
jobs:
4+
Move_Labeled_Card_On_Project_Board:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: takanabe/[email protected]
8+
if: github.event.action == 'labeled' && (github.event_name == 'issues' && github.event.issue.state == 'open' && contains(github.event.issue.labels.*.name, 'discovery')) || (github.event_name == 'pull_request' && github.event.pull_request.state == 'open' && contains(github.event.pull_request.labels.*.name, 'discovery'))
9+
env:
10+
GITHUB_TOKEN: ${{ secrets.ACTIONS }}
11+
GITHUB_PROJECT_URL: https://github.com/orgs/github/projects/2
12+
GITHUB_PROJECT_COLUMN_NAME: Needs discovery
13+
- uses: takanabe/[email protected]
14+
if: github.event.action == 'labeled' && (github.event_name == 'issues' && github.event.issue.state == 'open' && contains(github.event.issue.labels.*.name, 'blocked')) || (github.event_name == 'pull_request' && github.event.pull_request.state == 'open' && contains(github.event.pull_request.labels.*.name, 'blocked'))
15+
env:
16+
GITHUB_TOKEN: ${{ secrets.ACTIONS }}
17+
GITHUB_PROJECT_URL: https://github.com/orgs/github/projects/2
18+
GITHUB_PROJECT_COLUMN_NAME: On hold
19+
- uses: takanabe/[email protected]
20+
if: github.event.action == 'labeled' && (github.event_name == 'issues' && github.event.issue.state == 'open' && contains(github.event.issue.labels.*.name, 'code review')) || (github.event_name == 'pull_request' && github.event.pull_request.state == 'open' && contains(github.event.pull_request.labels.*.name, 'code review'))
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.ACTIONS }}
23+
GITHUB_PROJECT_URL: https://github.com/orgs/github/projects/2
24+
GITHUB_PROJECT_COLUMN_NAME: Code review
25+
- uses: takanabe/[email protected]
26+
if: github.event.action == 'labeled' && (github.event_name == 'issues' && github.event.issue.state == 'open' && contains(github.event.issue.labels.*.name, 'testing')) || (github.event_name == 'pull_request' && github.event.pull_request.state == 'open' && contains(github.event.pull_request.labels.*.name, 'testing'))
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.ACTIONS }}
29+
GITHUB_PROJECT_URL: https://github.com/orgs/github/projects/2
30+
GITHUB_PROJECT_COLUMN_NAME: Testing
31+
- uses: takanabe/[email protected]
32+
if: github.event.action == 'labeled' && (github.event_name == 'issues' && github.event.issue.state == 'open' && contains(github.event.issue.labels.*.name, 'Ready for merge')) || (github.event_name == 'pull_request' && github.event.pull_request.state == 'open' && contains(github.event.pull_request.labels.*.name, 'Ready for merge'))
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.ACTIONS }}
35+
GITHUB_PROJECT_URL: https://github.com/orgs/github/projects/2
36+
GITHUB_PROJECT_COLUMN_NAME: Ready for merge?

CHANGELOG-prerelease.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## Prerelease 50 ( TBD )
22

3-
- [](https://github.com/patternfly/patternfly-elements/commit/) Add automatic labeling to PRs
3+
- [775b821](https://github.com/patternfly/patternfly-elements/commit/775b821702c903f926b8bf9fdf9c948ac949335f) Add automatic labeling to PRs
4+
- [](https://github.com/patternfly/patternfly-elements/commit/) Move PR cards automatically in the Project when labels are changed
45

56
## Prerelease 49 ( 2020-05-29 )
67

0 commit comments

Comments
 (0)