From f67f200c43be286c4de5e09a17c1298b78855999 Mon Sep 17 00:00:00 2001 From: Defame1297 Date: Sun, 22 Nov 2026 07:42:43 +0000 Subject: [PATCH] feat(gitea): add issue forms and a pull request template Bug and feature-request YAML forms with blank issues disabled and a contact link to SECURITY.md, and a pull request template with What and why, Verified and Not verified plus the third-party-material statement. The templates are on the Molecule selector's IGNORED list: no scenario reads them, so a template-only change runs no scenarios. Closes #191 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_014uGZTNmHMc85bomfevwUDG --- .gitea/ISSUE_TEMPLATE/bug.yml | 60 +++++++++++++++++++ .gitea/ISSUE_TEMPLATE/config.yml | 5 ++ .gitea/ISSUE_TEMPLATE/feature.yml | 27 +++++++++ .gitea/PULL_REQUEST_TEMPLATE.md | 15 +++++ scripts/select_molecule_scenarios.py | 2 + .../scripts/test_select_molecule_scenarios.py | 11 ++++ 6 files changed, 120 insertions(+) create mode 100644 .gitea/ISSUE_TEMPLATE/bug.yml create mode 100644 .gitea/ISSUE_TEMPLATE/config.yml create mode 100644 .gitea/ISSUE_TEMPLATE/feature.yml create mode 100644 .gitea/PULL_REQUEST_TEMPLATE.md diff --git a/.gitea/ISSUE_TEMPLATE/bug.yml b/.gitea/ISSUE_TEMPLATE/bug.yml new file mode 100644 index 0000000..6b5c665 --- /dev/null +++ b/.gitea/ISSUE_TEMPLATE/bug.yml @@ -0,0 +1,60 @@ +name: Bug report +about: A role does something other than what its README says. +body: + - type: markdown + attributes: + value: | + One bug per issue. + - type: input + id: role + attributes: + label: Role + description: The role's name, as its directory under `roles/`, for example `docker`. + validations: + required: true + - type: input + id: release + attributes: + label: Release tag + description: The Collection release you installed, as `vX.Y.Z`. Leave empty if you run an untagged commit and name it under Actual behaviour. + placeholder: vX.Y.Z + validations: + regex: '^v\d+\.\d+\.\d+$' + - type: input + id: ansible_core + attributes: + label: ansible-core version + description: The first line of `ansible --version`, version number only. + placeholder: X.Y.Z + validations: + regex: '^\d+\.\d+(\.\d+)?$' + - type: dropdown + id: platform + attributes: + label: Platform + description: The target host's operating system. + options: + - Ubuntu 24.04 + - Ubuntu 26.04 + - Debian 13 + - other + - type: textarea + id: playbook + attributes: + label: Minimal playbook + description: The smallest playbook and variables that show the bug. Remove secrets and real host names. + render: yaml + - type: textarea + id: expected + attributes: + label: Expected behaviour + description: What should happen, and where the role's README or defaults say so. + validations: + required: true + - type: textarea + id: actual + attributes: + label: Actual behaviour + description: What happened instead, with the failing task's output. + validations: + required: true diff --git a/.gitea/ISSUE_TEMPLATE/config.yml b/.gitea/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..ee3fd2d --- /dev/null +++ b/.gitea/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: Report a vulnerability + url: https://git.rkdr.net/mortis/kamino/src/branch/main/SECURITY.md + about: Report suspected vulnerabilities privately as SECURITY.md describes, never in an issue. diff --git a/.gitea/ISSUE_TEMPLATE/feature.yml b/.gitea/ISSUE_TEMPLATE/feature.yml new file mode 100644 index 0000000..2fa4d9a --- /dev/null +++ b/.gitea/ISSUE_TEMPLATE/feature.yml @@ -0,0 +1,27 @@ +name: Feature or role request +about: A new role, variable, option or platform. +body: + - type: markdown + attributes: + value: | + An agent may work from this issue as its only spec: write it so that it needs nothing else. + - type: textarea + id: problem + attributes: + label: Problem + description: What is wrong or missing today, for whom, and what is out of scope. + validations: + required: true + - type: textarea + id: proposal + attributes: + label: Proposal + description: The change you have in mind, if any. + - type: textarea + id: acceptance + attributes: + label: Acceptance criteria + description: A list of checkable criteria. For each, name the command, test or check that proves it. + placeholder: "- [ ] ..." + validations: + required: true diff --git a/.gitea/PULL_REQUEST_TEMPLATE.md b/.gitea/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..a71914f --- /dev/null +++ b/.gitea/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,15 @@ +## What and why + +Closes # + +## Verified + +The commands you ran and links to the CI runs. + +## Not verified + +What was not tested, said plainly, or "Nothing". + +--- + +- [ ] I confirm third-party material is recorded in `NOTICE` and `REUSE.toml`, or there is none. diff --git a/scripts/select_molecule_scenarios.py b/scripts/select_molecule_scenarios.py index b4d7735..34d059c 100644 --- a/scripts/select_molecule_scenarios.py +++ b/scripts/select_molecule_scenarios.py @@ -84,6 +84,8 @@ IGNORED = ( "tests/scripts/*", "images/*", ".gitea/actionlint.yaml", + ".gitea/ISSUE_TEMPLATE/*", + ".gitea/PULL_REQUEST_TEMPLATE.md", ".gitea/workflows/lint.yml", ".gitea/workflows/build.yml", ".gitea/workflows/image.yml", diff --git a/tests/scripts/test_select_molecule_scenarios.py b/tests/scripts/test_select_molecule_scenarios.py index 0e9074b..3a85bcb 100644 --- a/tests/scripts/test_select_molecule_scenarios.py +++ b/tests/scripts/test_select_molecule_scenarios.py @@ -146,6 +146,17 @@ class SelectTest(unittest.TestCase): chosen, _reason = sel.select(ALL, ["roles/AGENTS.md"]) self.assertEqual(chosen, []) + def test_issue_and_pull_request_templates_select_nothing(self): + # Gitea reads them for its web forms; no scenario does, and they are not shipped. + chosen, _reason = self.select( + [ + ".gitea/ISSUE_TEMPLATE/config.yml", + ".gitea/ISSUE_TEMPLATE/bug.yml", + ".gitea/PULL_REQUEST_TEMPLATE.md", + ], + ) + self.assertEqual(chosen, []) + def test_ignored_does_not_mask_a_role(self): chosen, _reason = self.select(["docs/x.md", "roles/docker/tasks/main.yml"]) self.assertEqual(chosen, ["roles/docker/molecule/default"]) -- 2.43.0