Skip to content

Commit 86434dc

Browse files
authored
Issues Templates and Labels (#9)
* New Issue Templates for more engagement * New Labels that are synced over all repos
1 parent f4c17f0 commit 86434dc

File tree

9 files changed

+248
-51
lines changed

9 files changed

+248
-51
lines changed

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 31 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,48 @@
11
name: "🐞 Bug Report"
2-
description: Report an issue with the package
2+
description: Report an issue with the package in detail
33
title: "[Bug]: "
4-
labels: ["Bug"]
4+
labels: ["Type: Bug"]
55
body:
66
- type: markdown
77
attributes:
88
value: |
9-
Before opening a bug report, please search if the problematic behavior has already been reported in the existing issues.
10-
11-
---
12-
13-
Thank you for taking the time to file a bug report. To address this bug as fast as possible, we need some information.
9+
Before opening a bug report, please search if the problematic behavior has already been reported in the existing issues
10+
and read the relevant documentation. Thank you for taking the time to file a bug report.
1411
15-
- type: checkboxes
16-
id: terms
12+
- type: textarea
13+
id: description
1714
attributes:
18-
label: Documentation
19-
description: Have you read the relevant documentation before submitting this issue?
20-
options:
21-
- label: "Yes"
22-
required: true
15+
label: Bug Description
16+
description: Give us a clear and concise description of the problem and the expected behavior.
17+
validations:
18+
required: true
2319

20+
- type: textarea
21+
id: steps
22+
attributes:
23+
label: Steps to Reproduce
24+
description: Describe the steps needed to reproduce this error.
25+
26+
- type: textarea
27+
id: suggestions
28+
attributes:
29+
label: Possible Fix Implementation
30+
description: If you can think of one, describe a possible implementation that would fix the issue.
31+
32+
- type: markdown
33+
attributes:
34+
value: |
35+
----
36+
To help us reproduce the issue, please include the following information in your bug report:
37+
2438
- type: input
2539
id: os
2640
attributes:
2741
label: Operating System
2842
description: "Which operating system do you encounter the issue on? Please provide the version as well."
2943
placeholder: "Example: macOS Big Sur 11.5.2"
3044
validations:
31-
required: true
45+
required: false
3246

3347
- type: input
3448
id: python
@@ -37,7 +51,7 @@ body:
3751
description: "Please provide the full Python version under which you have observed the behavior."
3852
placeholder: "Example: 3.9.0"
3953
validations:
40-
required: true
54+
required: false
4155

4256
- type: input
4357
id: version
@@ -46,31 +60,11 @@ body:
4660
description: "Please provide the full version of the package under which you have observed the behavior."
4761
placeholder: "Example: 1.2.0"
4862
validations:
49-
required: true
50-
51-
- type: textarea
52-
id: description
53-
attributes:
54-
label: Bug Description
55-
description: Give us a clear and concise description of the problem and the expected behavior.
56-
validations:
57-
required: true
58-
59-
- type: textarea
60-
id: steps
61-
attributes:
62-
label: Steps to Reproduce
63-
description: Describe the steps needed to reproduce this error.
63+
required: false
6464

6565
- type: textarea
6666
id: logs
6767
attributes:
6868
label: Relevant output
6969
description: If applicable, provide relevant log output (no need for back-ticks here).
7070
render: shell
71-
72-
- type: textarea
73-
id: suggestions
74-
attributes:
75-
label: Possible Fix Implementation
76-
description: If you can think of one, describe a possible implementation that would fix the issue.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: "🪳 Quick Bug Report"
2+
description: Report an issue with the package
3+
title: "[Bug]: "
4+
labels: ["Type: Bug"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Before opening a bug report, please search if the problematic behavior has already been reported in the existing issues
10+
and read the relevant documentation. Thank you for taking the time to file a bug report.
11+
12+
- type: textarea
13+
id: description
14+
attributes:
15+
label: Bug Description
16+
description: Give us a clear and concise description of the problem and the expected behavior.
17+
validations:
18+
required: true

.github/ISSUE_TEMPLATE/documentation.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: "📚 Documentation"
22
description: Suggest edits or additions for the documentation
33
title: "[Documentation]: "
4-
labels: ["Enhancement", "Documentation"]
4+
labels: ["Type: Feature", "Type: Documentation"]
55
body:
66
- type: markdown
77
attributes:
@@ -23,8 +23,6 @@ body:
2323
label: Pertinent Section
2424
description: "Please provide a permalink to the relevant section heading in the documentation. Choose the most specific section / lowest-level heading to which your suggested change would apply."
2525
placeholder: "https://pylhc.github.io/..."
26-
validations:
27-
required: true
2826

2927
- type: textarea
3028
id: description

.github/ISSUE_TEMPLATE/feature.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: "🚀 Feature Request"
22
description: Propose a new feature for the package
33
title: "[Feature Request]: "
4-
labels: ["Enhancement", "Feature Request"]
4+
labels: ["Type: Feature"]
55
body:
66
- type: markdown
77
attributes:

.github/ISSUE_TEMPLATE/other.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: "👀 Other"
2+
description: Everything that does not fit with the other type of issues.
3+
body:
4+
- type: textarea
5+
id: content
6+
attributes:
7+
label: Content
8+
validations:
9+
required: true

.github/ISSUE_TEMPLATE/question.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,13 @@
11
name: "🙋 Ask a Question"
22
description: Discuss questions you have about the software
33
title: "[Question]: "
4-
labels: ["Help", "Question"]
4+
labels: ["Type: Question"]
55
body:
66
- type: markdown
77
attributes:
88
value: |
99
We are happy to get feedback and help users of our packages. Let's discuss!
1010
11-
- type: checkboxes
12-
id: terms
13-
attributes:
14-
label: Documentation
15-
description: Have you read the relevant documentation before asking your question?
16-
options:
17-
- label: "Yes"
18-
required: true
19-
2011
- type: textarea
2112
id: question
2213
attributes:

.github/workflows/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,9 @@ Secrets:
7676
- `PYPI_PASSWORD`: The pypi password.
7777

7878
This workflow should be set to trigger anytime a `release` is made of the GitHub repository.
79+
80+
81+
## Assign Labels
82+
83+
Assign labels from json definition file in `labels/` to selected pylhc repos.
84+
This is not a re-usable workflow, but runs on every push to `master` on THIS repo.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Assign labels from json definition to all repos
2+
# This uses https://github.com/Financial-Times/github-label-sync
3+
4+
# The GITHUB_TOKEN only grants access to the current directory.
5+
# Check https://github.com/orgs/community/discussions/46566
6+
# if they have added a feature to allow access to all organization repositories.
7+
# Until then we use the ISSUE_WRITE_TOKEN which was generated by pylhctokens,
8+
# but is only valid for a limited amount of time (1 year).
9+
# It's a fine-grained token with write access to Issues and PRs, as required.
10+
11+
name: Assign labels to all repos
12+
13+
on: # Runs on any push event in a PR or any push event to master
14+
push:
15+
branches:
16+
- 'master'
17+
18+
defaults:
19+
run:
20+
shell: bash
21+
22+
jobs:
23+
assign-labels:
24+
permissions: # permissions for the GITHUB_TOKEN
25+
issues: write
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v4
29+
30+
- name: Install github-label-sync
31+
run: |
32+
npm install -g github-label-sync
33+
34+
- name: Assign labels into all repos
35+
working-directory: ./labels # labels.json is default filename for github-label-sync
36+
env:
37+
# GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
GITHUB_ACCESS_TOKEN: ${{ secrets.ISSUE_WRITE_TOKEN }}
39+
run: |
40+
github-label-sync pylhc/.github
41+
github-label-sync pylhc/optics_functions
42+
github-label-sync pylhc/omc3
43+
github-label-sync pylhc/omc3_gui
44+
github-label-sync pylhc/tfs
45+
github-label-sync pylhc/pylhc.github.io
46+
github-label-sync pylhc/submitter
47+
github-label-sync pylhc/turn_by_turn
48+
github-label-sync pylhc/PyLHC
49+
github-label-sync pylhc/sdds
50+
github-label-sync pylhc/generic_parser
51+
github-label-sync pylhc/MESS
52+
github-label-sync pylhc/ir_dodecapole_corrections
53+
github-label-sync pylhc/irnl_rdt_correction
54+
github-label-sync pylhc/accelerator_timeline

labels/labels.json

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
[
2+
{
3+
"name": "Domain: GUI",
4+
"color": "#8F12C9",
5+
"aliases": ["GUI"],
6+
"description": "Closely related to GUI and/or needs GUI changes as well."
7+
},
8+
{
9+
"name": "Domain: Physics",
10+
"color": "#EF8206",
11+
"aliases": [],
12+
"description": "The implementation is closely related to new physics to be used."
13+
},
14+
{
15+
"name": "Type: Bug",
16+
"color": "#FC060A",
17+
"aliases": ["Bug", "Bugfix"],
18+
"description": "Something isn't working as it should."
19+
},
20+
{
21+
"name": "Type: Maintenance",
22+
"color": "#fbca04",
23+
"aliases": ["Maintenance"],
24+
"description": "Improvements in the code, that are not necessarily visible in functionality."
25+
},
26+
{
27+
"name": "Type: Feature",
28+
"color": "#047CFD",
29+
"aliases": ["Feature", "Enhancement"],
30+
"description": "A (suggetion for a) new feature or enhancement in functionality."
31+
},
32+
{
33+
"name": "Type: Question",
34+
"color": "#FD067D",
35+
"aliases": ["Question"],
36+
"description": "Something is not clear or is not understood."
37+
},
38+
{
39+
"name": "Type: Documentation",
40+
"color": "#95FD04",
41+
"aliases": ["Documentation"],
42+
"description": "Improvements, updates and fixes to the documentation."
43+
},
44+
{
45+
"name": "Type: CI/CD",
46+
"color": "#646464",
47+
"aliases": ["CI/CD"],
48+
"description": "Improvements, updates and fixes to the continuous integration."
49+
},
50+
{
51+
"name": "Type: Release",
52+
"color": "#00E5FF",
53+
"aliases": ["Release"],
54+
"description": "Issue preparing for a release."
55+
},
56+
{
57+
"name": "Status: Blocked",
58+
"color": "#FDA8A9",
59+
"aliases": [],
60+
"description": "Cannot be worked on until something else happens (e.g. closing other issues)."
61+
},
62+
{
63+
"name": "Status: In Progress",
64+
"color": "#A1DCF7",
65+
"aliases": [],
66+
"description": "Currently being worked on."
67+
},
68+
{
69+
"name": "Status: On Hold",
70+
"color": "#B5A6F9",
71+
"aliases": [],
72+
"description": "Work currently stopped, but not for blocking reasons."
73+
},
74+
{
75+
"name": "Status: Review Needed",
76+
"color": "#FBE9A3",
77+
"aliases": [],
78+
"description": "Work currently stopped, untils someone else reviews it."
79+
},
80+
{
81+
"name": "Status: Wontfix",
82+
"color": "#DDDDDD",
83+
"aliases": ["Wontfix"],
84+
"description": "Cannot or should not be fixed."
85+
},
86+
{
87+
"name": "Estimate: Easy",
88+
"color": "#004709",
89+
"aliases": ["Good First Issue"],
90+
"description": "Good first issue for newcomers. Straightforward fixes."
91+
},
92+
{
93+
"name": "Estimate: Normal",
94+
"color": "#010545",
95+
"aliases": [],
96+
"description": "Straightforward, but might require some time. Probably needs additional tests."
97+
},
98+
{
99+
"name": "Estimate: Complicated",
100+
"color": "#540101",
101+
"aliases": [],
102+
"description": "Might need some major overhaul of the code."
103+
},
104+
{
105+
"name": "Priority: Low",
106+
"color": "#79CE38",
107+
"aliases": ["Minor Issue"],
108+
"description": "Work on this if you have some spare time."
109+
},
110+
{
111+
"name": "Priority: Medium",
112+
"color": "#D8D51F",
113+
"aliases": [],
114+
"description": "Work on this."
115+
},
116+
{
117+
"name": "Priority: High",
118+
"color": "#C65339",
119+
"aliases": ["Important Issue"],
120+
"description": "Work on this!"
121+
},
122+
{
123+
"name": "Priority: Critical",
124+
"color": "#CA3538",
125+
"description": "Work on this!!"
126+
}
127+
]

0 commit comments

Comments
 (0)