Skip to content

Commit 7277640

Browse files
authored
fix labels (via #1318)
1 parent d32370e commit 7277640

8 files changed

Lines changed: 120 additions & 81 deletions

File tree

.github/ISSUE_TEMPLATE.md

Lines changed: 0 additions & 47 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
name: 🐞 Bug Report
2-
description: File a Bug report in Java Integration
3-
title: "🐞: "
4-
labels: [ "type:bug", "triage" ]
1+
name: Bug report
2+
description: Report broken or incorrect behavior in an Allure Java integration.
3+
type: bug
54
assignees: []
65
body:
76
- type: markdown
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Feature request
2+
description: Suggest a user-facing feature or improvement.
3+
type: feature
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Thanks for suggesting an improvement for Allure Java. Please describe the outcome you need, not only a possible implementation.
9+
- type: textarea
10+
id: problem
11+
attributes:
12+
label: What problem should this solve?
13+
description: Describe the workflow, limitation, or user need behind the request.
14+
validations:
15+
required: true
16+
- type: textarea
17+
id: proposal
18+
attributes:
19+
label: What would you like to happen?
20+
description: Describe the behavior or capability you want Allure Java to provide.
21+
validations:
22+
required: true
23+
- type: textarea
24+
id: alternatives
25+
attributes:
26+
label: Alternatives considered
27+
description: Share any current workaround or alternative design you have considered.
28+
- type: textarea
29+
id: additional-context
30+
attributes:
31+
label: Additional context
32+
description: Add examples, links, screenshots, or related issues.

.github/ISSUE_TEMPLATE/task.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Task
2+
description: Track internal maintenance or repository work.
3+
type: task
4+
body:
5+
- type: textarea
6+
id: goal
7+
attributes:
8+
label: Goal
9+
description: Describe the maintenance, cleanup, or repository task.
10+
validations:
11+
required: true
12+
- type: textarea
13+
id: details
14+
attributes:
15+
label: Details
16+
description: Add relevant context, constraints, links, or acceptance criteria.

.github/dependabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ updates:
55
schedule:
66
interval: "daily"
77
labels:
8-
- "type:dependencies"
8+
- "pr:dependencies"
99

1010
- package-ecosystem: "gradle"
1111
directory: "/"
1212
schedule:
1313
interval: "daily"
1414
labels:
15-
- "type:dependencies"
15+
- "pr:dependencies"
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!---
2-
Thank you so much for sending us a pull request!
2+
Thank you so much for sending us a pull request!
33
4-
Make sure you have a clear name for your pull request.
4+
Make sure you have a clear name for your pull request.
55
The name should start with a capital letter and no dot is required in the end of the sentence.
66
To link the request with issues use the following notation: (fixes #123, fixes #321\)
77
@@ -12,12 +12,14 @@ An example of good pull request names:
1212
-->
1313

1414
### Context
15+
1516
<!---
1617
Describe the problem or feature in addition to a link to the issues
1718
-->
1819

1920
#### Checklist
21+
2022
- [ ] [Sign Allure CLA][cla]
2123
- [ ] Provide unit tests
2224

23-
[cla]: https://cla-assistant.io/accept/allure-framework/allure2
25+
[cla]: https://cla-assistant.io/accept/allure-framework/allure-java

.github/release.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,28 @@
11
# release.yml
22

33
changelog:
4+
exclude:
5+
labels:
6+
- 'pr:invalid'
47
categories:
58
- title: '🚀 New Features'
69
labels:
7-
- 'type:new feature'
10+
- 'pr:new feature'
811
- title: '🔬 Improvements'
912
labels:
10-
- 'type:improvement'
13+
- 'pr:improvement'
1114
- title: '🐞 Bug Fixes'
1215
labels:
13-
- 'type:bug'
16+
- 'pr:bug'
1417
- title: '⬆️ Dependency Updates'
1518
labels:
16-
- 'type:dependencies'
19+
- 'pr:dependencies'
1720
- title: '📖 Documentation improvements'
1821
labels:
19-
- 'type:documentation'
22+
- 'pr:documentation'
2023
- title: '⛔️ Security'
2124
labels:
22-
- 'type:security'
25+
- 'pr:security'
2326
- title: '👻 Internal changes'
2427
labels:
25-
- 'type:internal'
28+
- 'pr:internal'
Lines changed: 52 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,61 @@
1-
name: "Verify type labels"
1+
name: "Verify PR labels"
22

33
on:
4-
pull_request_target:
5-
types: [opened, labeled, unlabeled, synchronize]
4+
pull_request:
5+
types:
6+
- opened
7+
- reopened
8+
- synchronize
9+
- ready_for_review
10+
- labeled
11+
- unlabeled
12+
- edited
613

714
permissions:
8-
contents: none
15+
contents: read
16+
pull-requests: read
17+
issues: read
918

1019
jobs:
1120
triage:
21+
name: Require exactly one pr label
1222
runs-on: ubuntu-latest
13-
permissions:
14-
pull-requests: read
1523
steps:
16-
- uses: baev/action-label-verify@main
17-
with:
18-
repo-token: ${{ secrets.GITHUB_TOKEN }}
19-
allowed: |
20-
type:bug
21-
type:dependencies
22-
type:improvement
23-
type:internal
24-
type:invalid
25-
type:new feature
26-
type:security
27-
type:documentation
24+
- name: Validate release notes label
25+
env:
26+
GH_TOKEN: ${{ github.token }}
27+
PR_NUMBER: ${{ github.event.pull_request.number }}
28+
shell: bash
29+
run: |
30+
labels="$(gh api "repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/labels" --jq '.[].name')"
31+
pr_labels="$(printf '%s\n' "${labels}" | grep '^pr:' || true)"
32+
33+
if [ -z "${pr_labels}" ]; then
34+
count=0
35+
else
36+
count="$(printf '%s\n' "${pr_labels}" | wc -l | tr -d ' ')"
37+
fi
38+
39+
if [ "${count}" -eq 1 ]; then
40+
echo "Found PR release-note label: ${pr_labels}"
41+
exit 0
42+
fi
43+
44+
{
45+
echo "Pull requests must have exactly one label with the pr: prefix."
46+
echo "Found ${count} pr: labels."
47+
if [ "${count}" -gt 0 ]; then
48+
printf 'Matching labels:\n'
49+
printf '%s\n' "${pr_labels}" | sed 's/^/- /'
50+
fi
51+
echo
52+
echo "Available labels on this PR:"
53+
if [ -n "${labels}" ]; then
54+
printf '%s\n' "${labels}" | sed 's/^/- /'
55+
else
56+
echo "- <none>"
57+
fi
58+
} >> "${GITHUB_STEP_SUMMARY}"
59+
60+
echo "::error title=Invalid pr: label count::Pull requests must have exactly one label with the pr: prefix. Found ${count}."
61+
exit 1

0 commit comments

Comments
 (0)