From 0af950aeffa8ee4ff10c1f306aee41fdd8516331 Mon Sep 17 00:00:00 2001 From: Dmitrii Evreinov Date: Fri, 10 Jul 2026 12:24:06 +0400 Subject: [PATCH] fix labels --- .github/ISSUE_TEMPLATE/bug_report.yml | 49 +++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 1 + .github/ISSUE_TEMPLATE/feature_request.yml | 32 ++++++++++++ .github/ISSUE_TEMPLATE/task.yml | 16 ++++++ .github/dependabot.yml | 8 +++ .github/pull_request_template.md | 25 +++++++++ .github/release.yml | 29 ++++++++++ .github/workflows/pr-labels.yml | 61 ++++++++++++++++++++++ 8 files changed, 221 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml create mode 100644 .github/ISSUE_TEMPLATE/task.yml create mode 100644 .github/dependabot.yml create mode 100644 .github/pull_request_template.md create mode 100644 .github/release.yml create mode 100644 .github/workflows/pr-labels.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..35eda34 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,49 @@ +name: Bug report +description: Report broken or incorrect behavior. +type: bug +body: + - type: markdown + attributes: + value: | + Thanks for helping improve allurectl. Please include enough detail for us to reproduce the problem. + - type: textarea + id: description + attributes: + label: What happened? + description: Describe the bug and the behavior you observed. + validations: + required: true + - type: textarea + id: reproduction + attributes: + label: How can we reproduce it? + description: Include commands, configuration, input files, or a minimal repository when possible. + placeholder: | + 1. Configure ... + 2. Run ... + 3. See ... + validations: + required: true + - type: textarea + id: expected + attributes: + label: What did you expect? + description: Describe the behavior you expected instead. + validations: + required: true + - type: textarea + id: environment + attributes: + label: Environment + description: Share versions and platform details relevant to the issue. + value: | + - allurectl version: + - OS: + - Shell: + validations: + required: true + - type: textarea + id: additional-context + attributes: + label: Additional context + description: Add logs, generated reports, or links that help explain the issue. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..3ba13e0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: false diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..050b1b2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,32 @@ +name: Feature request +description: Suggest a user-facing feature or improvement. +type: feature +body: + - type: markdown + attributes: + value: | + Thanks for suggesting an improvement for allurectl. Please describe the outcome you need, not only a possible implementation. + - type: textarea + id: problem + attributes: + label: What problem should this solve? + description: Describe the workflow, limitation, or user need behind the request. + validations: + required: true + - type: textarea + id: proposal + attributes: + label: What would you like to happen? + description: Describe the behavior or capability you want allurectl to provide. + validations: + required: true + - type: textarea + id: alternatives + attributes: + label: Alternatives considered + description: Share any current workaround or alternative design you have considered. + - type: textarea + id: additional-context + attributes: + label: Additional context + description: Add examples, links, screenshots, or related issues. diff --git a/.github/ISSUE_TEMPLATE/task.yml b/.github/ISSUE_TEMPLATE/task.yml new file mode 100644 index 0000000..7cd649f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/task.yml @@ -0,0 +1,16 @@ +name: Task +description: Track internal maintenance or repository work. +type: task +body: + - type: textarea + id: goal + attributes: + label: Goal + description: Describe the maintenance, cleanup, or repository task. + validations: + required: true + - type: textarea + id: details + attributes: + label: Details + description: Add relevant context, constraints, links, or acceptance criteria. diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..51ca9ab --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,8 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + labels: + - "pr:dependencies" diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..0bc3e13 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,25 @@ + + +### Context + + + +#### Checklist + +- [ ] [Sign Allure CLA][cla] +- [ ] Provide unit tests + +[cla]: https://cla-assistant.io/accept/allure-framework/allurectl diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 0000000..4e3262f --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,29 @@ +# release.yml + +changelog: + exclude: + labels: + - "pr:invalid" + - "pr:tests" + categories: + - title: "🚀 New Features" + labels: + - "pr:new feature" + - title: "🔬 Improvements" + labels: + - "pr:improvement" + - title: "🐞 Bug Fixes" + labels: + - "pr:bug" + - title: "⬆️ Dependency Updates" + labels: + - "pr:dependencies" + - title: "📖 Documentation improvements" + labels: + - "pr:documentation" + - title: "⛔️ Security" + labels: + - "pr:security" + - title: "👻 Internal changes" + labels: + - "pr:internal" diff --git a/.github/workflows/pr-labels.yml b/.github/workflows/pr-labels.yml new file mode 100644 index 0000000..a783478 --- /dev/null +++ b/.github/workflows/pr-labels.yml @@ -0,0 +1,61 @@ +name: Pull Request Labels + +on: + pull_request: + types: + - opened + - reopened + - synchronize + - ready_for_review + - labeled + - unlabeled + - edited + +permissions: + contents: read + pull-requests: read + issues: read + +jobs: + require-pr-label: + name: Require exactly one pr label + runs-on: ubuntu-latest + steps: + - name: Validate release notes label + env: + GH_TOKEN: ${{ github.token }} + PR_NUMBER: ${{ github.event.pull_request.number }} + shell: bash + run: | + labels="$(gh api "repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/labels" --jq '.[].name')" + pr_labels="$(printf '%s\n' "${labels}" | grep '^pr:' || true)" + + if [ -z "${pr_labels}" ]; then + count=0 + else + count="$(printf '%s\n' "${pr_labels}" | wc -l | tr -d ' ')" + fi + + if [ "${count}" -eq 1 ]; then + echo "Found PR release-note label: ${pr_labels}" + exit 0 + fi + + { + echo "Pull requests must have exactly one label with the pr: prefix." + echo "Found ${count} pr: labels." + if [ "${count}" -gt 0 ]; then + printf 'Matching labels:\n' + printf '%s\n' "${pr_labels}" | sed 's/^/- /' + fi + echo + echo "Available labels on this PR:" + if [ -n "${labels}" ]; then + printf '%s\n' "${labels}" | sed 's/^/- /' + else + echo "- " + fi + } >> "${GITHUB_STEP_SUMMARY}" + + echo "::error title=Invalid pr: label count::Pull requests must have exactly one label with the pr: prefix. Found ${count}." + exit 1