diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..a94c49c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,25 @@ +name: Bug report +description: Report a reproducible bug +type: bug +body: + - type: textarea + id: description + attributes: + label: Describe the bug + description: What happened and what did you expect? + validations: + required: true + - type: textarea + id: reproduction + attributes: + label: Steps to reproduce + description: Provide a minimal reproduction or exact steps. + validations: + required: true + - type: textarea + id: environment + attributes: + label: Environment + description: Include OS, runtime, and package versions where relevant. + validations: + required: false 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..76b73cb --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,25 @@ +name: Feature request +description: Suggest an improvement or a new capability +type: feature +body: + - type: textarea + id: problem + attributes: + label: Problem + description: What problem would this solve? + validations: + required: true + - type: textarea + id: proposal + attributes: + label: Proposal + description: Describe the behavior you would like to see. + validations: + required: true + - type: textarea + id: alternatives + attributes: + label: Alternatives + description: Describe any alternatives you considered. + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/task.yml b/.github/ISSUE_TEMPLATE/task.yml new file mode 100644 index 0000000..0788183 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/task.yml @@ -0,0 +1,18 @@ +name: Task +description: Track maintenance or internal work +type: task +body: + - type: textarea + id: context + attributes: + label: Context + description: Describe the task and why it is needed. + validations: + required: true + - type: textarea + id: done + attributes: + label: Definition of done + description: What needs to be true for this task to be complete? + validations: + required: true diff --git a/.github/dependabot.yml b/.github/dependabot.yml index bb85b6f..1d8905b 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,8 +4,12 @@ updates: directory: / schedule: interval: daily + labels: + - pr:dependencies - package-ecosystem: npm directory: / schedule: interval: daily + labels: + - pr:dependencies diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..429af60 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,19 @@ + + +### Context + + + +#### Checklist + +- [ ] [Sign Allure CLA][cla] +- [ ] Provide unit tests + +[cla]: https://cla-assistant.io/accept/allure-framework/setup-allurectl diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 0000000..34cc80f --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,32 @@ +# 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 + labels: + - pr:documentation + - title: Security + labels: + - pr:security + - title: Internal changes + labels: + - pr:internal + - title: Other Changes + labels: + - "*" diff --git a/.github/workflows/pr-labels.yml b/.github/workflows/pr-labels.yml new file mode 100644 index 0000000..bc85c29 --- /dev/null +++ b/.github/workflows/pr-labels.yml @@ -0,0 +1,56 @@ +name: PR labels + +on: + pull_request: + types: + - opened + - reopened + - synchronize + - ready_for_review + - labeled + - unlabeled + - edited + +permissions: + contents: read + pull-requests: 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 + 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:" + printf '%s\n' "${labels}" | sed 's/^/- /' + } >> "${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