Skip to content

Commit 6dc4f58

Browse files
authored
Merge pull request #22 from processing/sableraf-issue-labels-automation
Update issue templates to use labels for contribution type
2 parents 6dc9a20 + 0a36ff7 commit 6dc4f58

File tree

5 files changed

+15
-23
lines changed

5 files changed

+15
-23
lines changed

.github/ISSUE_TEMPLATE/1_new-library.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
name: 💙 New Library
1+
name: 💙 New Library
22
description: Submit a new Processing library
3-
labels: ["new-contribution"]
3+
labels: ["new-contribution", "library"]
44
body:
55
- type: markdown
66
attributes:
@@ -48,7 +48,3 @@ body:
4848
The result of this validation will be added to this issue:
4949
- If valid, a pull request will automatically be created to add your library to the repository.
5050
- If invalid, a comment will be added with details of the error. You will need to fix the file and resubmit.
51-
- type: hidden
52-
id: contribution_type
53-
attributes:
54-
value: library

.github/ISSUE_TEMPLATE/2_new-tool.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: 🔨 New Tool
22
description: Submit a new Processing tool
3-
labels: ["new-contribution"]
3+
labels: ["new-contribution", "tool"]
44
body:
55
- type: markdown
66
attributes:
@@ -48,7 +48,3 @@ body:
4848
The result of this validation will be added to this issue:
4949
- If valid, a pull request will automatically be created to add your tool to the repository.
5050
- If invalid, a comment will be added with details of the error. You will need to fix the file and resubmit.
51-
- type: hidden
52-
id: contribution_type
53-
attributes:
54-
value: tool

.github/ISSUE_TEMPLATE/3_new-mode.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: 👗 New Mode
22
description: Submit a new Processing mode
3-
labels: ["new-contribution"]
3+
labels: ["new-contribution", "mode"]
44
body:
55
- type: markdown
66
attributes:
@@ -48,7 +48,3 @@ body:
4848
The result of this validation will be added to this issue:
4949
- If valid, a pull request will automatically be created to add your mode to the repository.
5050
- If invalid, a comment will be added with details of the error. You will need to fix the file and resubmit.
51-
- type: hidden
52-
id: contribution_type
53-
attributes:
54-
value: mode

.github/ISSUE_TEMPLATE/4_new-examples.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: 📦 New Example Pack
22
description: Submit a new Processing example pack
3-
labels: ["new-contribution"]
3+
labels: ["new-contribution", "examples"]
44
body:
55
- type: markdown
66
attributes:
@@ -48,7 +48,3 @@ body:
4848
The result of this validation will be added to this issue:
4949
- If valid, a pull request will automatically be created to add your example pack to the repository.
5050
- If invalid, a comment will be added with details of the error. You will need to fix the file and resubmit.
51-
- type: hidden
52-
id: contribution_type
53-
attributes:
54-
value: examples

.github/workflows/issue_to_pr.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,19 @@ jobs:
3535
- name: Install dependencies
3636
run: pip install -r requirements.txt
3737

38+
- name: Determine category from labels
39+
id: determineCategory
40+
run: echo "::set-output name=category::${{
41+
contains(github.event.issue.labels.*.name, 'examples') && 'examples'
42+
|| contains(github.event.issue.labels.*.name, 'mode') && 'mode'
43+
|| contains(github.event.issue.labels.*.name, 'tool') && 'tool'
44+
|| contains(github.event.issue.labels.*.name, 'library') && 'library'}}"
45+
3846
- name: Read and validate properties txt file
3947
id: parseProps
4048
run: >
4149
python -u scripts/parse_and_validate_properties_txt.py \
42-
${{ fromJson(steps.parseIssue.outputs.payload).contribution_type }} \
50+
${{ steps.determineCategory.outputs.category }} \
4351
"${{ fromJson(steps.parseIssue.outputs.payload).properties_url }}"
4452
4553
- name: add comment to issue
@@ -57,7 +65,7 @@ jobs:
5765
issue-number: ${{ github.event.issue.number }}
5866
body: |
5967
There was an error in reading in your file and parsing it.
60-
68+
6169
${{ steps.parseProps.outputs.error }}
6270
create-pr:
6371
needs: validate

0 commit comments

Comments
 (0)