From 93c30d16d53386eeb3bfc2f66eb4366b5141f6e2 Mon Sep 17 00:00:00 2001 From: Dmitrii Evreinov Date: Fri, 10 Jul 2026 12:11:40 +0400 Subject: [PATCH] fix labels --- .github/ISSUE_TEMPLATE/bug_report.md | 38 -------------- .github/ISSUE_TEMPLATE/bug_report.yml | 50 ++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 1 + .github/ISSUE_TEMPLATE/feature_request.md | 20 ------- .github/ISSUE_TEMPLATE/feature_request.yml | 32 ++++++++++++ .github/ISSUE_TEMPLATE/task.yml | 16 ++++++ .github/dependabot.yml | 4 +- .github/pull_request_template.md | 25 +++++++++ .github/release.yml | 19 ++++--- .github/workflows/labels-verify.yml | 16 ------ .github/workflows/pr-labels.yml | 61 ++++++++++++++++++++++ 11 files changed, 200 insertions(+), 82 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml create mode 100644 .github/ISSUE_TEMPLATE/task.yml create mode 100644 .github/pull_request_template.md delete mode 100644 .github/workflows/labels-verify.yml create mode 100644 .github/workflows/pr-labels.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index dd84ea7..0000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: '' -assignees: '' - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Desktop (please complete the following information):** - - OS: [e.g. iOS] - - Browser [e.g. chrome, safari] - - Version [e.g. 22] - -**Smartphone (please complete the following information):** - - Device: [e.g. iPhone6] - - OS: [e.g. iOS8.1] - - Browser [e.g. stock browser, safari] - - Version [e.g. 22] - -**Additional context** -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..8ed250c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,50 @@ +name: Bug report +description: Report broken or incorrect behavior. +type: bug +body: + - type: markdown + attributes: + value: | + Thanks for helping improve Allure Codeception. 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, test code, 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: | + - Allure Codeception version: + - PHP version: + - Codeception version: + - OS: + 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.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index bbcbbe7..0000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: '' -labels: '' -assignees: '' - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..e9c9c8a --- /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 Allure Codeception. 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 Allure Codeception 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 index 95bc24b..538cdff 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,11 +5,11 @@ updates: schedule: interval: "daily" labels: - - "type:dependencies" + - "pr:dependencies" - package-ecosystem: "composer" directory: "/" schedule: interval: "daily" labels: - - "type:dependencies" + - "pr:dependencies" diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..1d19fa2 --- /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/allure-codeception diff --git a/.github/release.yml b/.github/release.yml index c382d69..abfeddc 100644 --- a/.github/release.yml +++ b/.github/release.yml @@ -1,22 +1,29 @@ # release.yml changelog: + exclude: + labels: + - 'pr:invalid' + - 'pr:tests' categories: - title: '🚀 New Features' labels: - - 'type:new feature' + - 'pr:new feature' - title: '🔬 Improvements' labels: - - 'type:improvement' + - 'pr:improvement' - title: '🐞 Bug Fixes' labels: - - 'type:bug' + - 'pr:bug' - title: '⬆️ Dependency Updates' labels: - - 'type:dependencies' + - 'pr:dependencies' + - title: '📖 Documentation improvements' + labels: + - 'pr:documentation' - title: '⛔️ Security' labels: - - 'type:security' + - 'pr:security' - title: '👻 Internal changes' labels: - - 'type:internal' + - 'pr:internal' diff --git a/.github/workflows/labels-verify.yml b/.github/workflows/labels-verify.yml deleted file mode 100644 index a79f60f..0000000 --- a/.github/workflows/labels-verify.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: "Verify type labels" - -on: - pull_request: - types: [opened, labeled, unlabeled, synchronize] - -permissions: - contents: read - -jobs: - triage: - runs-on: ubuntu-latest - steps: - - uses: baev/match-label-action@master - with: - allowed: 'type:bug,type:new feature,type:improvement,type:dependencies,type:internal,type:invalid,type:docs' 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