diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000000..b6c4936d7b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,104 @@ +name: Bug report +description: VIctory crashes, stops, or does not do what the console does. +labels: [bug] +body: + - type: markdown + attributes: + value: | + One problem in each report. Search the open issues first: if your crash has the same address (for example `+0x4e8aa70`), add a comment there. + + Do not attach game files, dumps, extracted data or screenshots of the game. Text logs from VIctory are permitted. See `docs/asset-policy.md`. + + - type: input + id: commit + attributes: + label: VIctory commit + description: Output of `git rev-parse --short HEAD`. + placeholder: 015d45b + validations: + required: true + + - type: dropdown + id: profile + attributes: + label: Build + options: + - release + - diag (with the diagnostics feature) + - debug + validations: + required: true + + - type: input + id: title-build + attributes: + label: Game build + description: The `build` line that `victory run` prints, and the package version. + placeholder: "build unknown (b99f876b…), package 1.0.2.1" + validations: + required: true + + - type: input + id: cpu + attributes: + label: CPU + description: The full model. Some console instructions are on AMD CPUs only. + placeholder: AMD Ryzen 7 5800X + validations: + required: true + + - type: input + id: gpu + attributes: + label: GPU and driver version + placeholder: AMD RX 6700 XT, Adrenalin 25.9.1 + validations: + required: true + + - type: input + id: os + attributes: + label: Operating system + description: Windows version and build number, or Wine/Proton version and distribution. + placeholder: Windows 11 24H2 (26100.4061) + validations: + required: true + + - type: textarea + id: steps + attributes: + label: What you did + description: The command you ran, environment variables you set, and the steps in the game. + render: text + validations: + required: true + + - type: textarea + id: result + attributes: + label: What happened + description: What you saw, and what you expected. + validations: + required: true + + - type: textarea + id: log + attributes: + label: Log + description: | + The crash report from `crashes.log` (in the data folder, default `%LOCALAPPDATA%\victory\data`) or the last 50 lines of console output. + render: text + validations: + required: true + + - type: checkboxes + id: confirm + attributes: + label: Confirm + options: + - label: I searched the issues and found no report of this problem. + required: true + - label: My game files come from a copy of the game that I own. + required: true + - label: This report does not include game files or data taken from them. + required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000000..3ba13e0cec --- /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 0000000000..4dc97e2f00 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,30 @@ +name: Feature request +description: A function that VIctory does not have. +labels: [enhancement] +body: + - type: markdown + attributes: + value: | + Read the status table in the README first. Work that it lists under "Needs" is known and does not need a request. + + - type: textarea + id: request + attributes: + label: Request + description: What VIctory must do, and which hardware or users it helps. + validations: + required: true + + - type: textarea + id: approach + attributes: + label: Possible approach + description: How it can be done, if you know. Give links to sources and their licences. + + - type: checkboxes + id: confirm + attributes: + label: Confirm + options: + - label: I searched the issues and the README, and found no request for this. + required: true diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000000..1a97bdb320 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,13 @@ +## What + + + +## Tested + + + +## Checklist + +- [ ] `cargo fmt`, `cargo clippy --workspace --all-targets` and `cargo test --workspace` pass. +- [ ] `cargo xtask policy` passes. The change adds no game files or data taken from them (`docs/asset-policy.md`). +- [ ] If an AI tool wrote part of this change, the description says so. diff --git a/.github/workflows/pr-description.yml b/.github/workflows/pr-description.yml new file mode 100644 index 0000000000..843dccc364 --- /dev/null +++ b/.github/workflows/pr-description.yml @@ -0,0 +1,31 @@ +name: PR description + +on: + pull_request: + types: [opened, edited, reopened, synchronize] + +permissions: {} + +jobs: + check: + runs-on: ubuntu-latest + steps: + # The body comes from the event file, not from an expression in the + # script, so text in the body cannot run as a command. + - name: Check the template sections + run: | + jq -r '.pull_request.body // ""' "$GITHUB_EVENT_PATH" \ + | tr -d '\r' \ + | perl -0pe 's///gs' > body.md + fail=0 + for section in What Tested; do + text=$(awk -v s="$section" ' + $0 ~ "^## " s "[[:space:]]*$" { on = 1; next } + /^## / { on = 0 } + on' body.md | tr -d '[:space:]') + if [ -z "$text" ]; then + echo "::error::The PR description has no text under \"## $section\". Use the template in .github/pull_request_template.md." + fail=1 + fi + done + exit $fail