diff --git a/.github/ISSUE_TEMPLATE/bug.yaml b/.github/ISSUE_TEMPLATE/bug.yaml new file mode 100644 index 000000000..45e5fe876 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.yaml @@ -0,0 +1,53 @@ +name: Bug Report +description: Report a bug or defect +labels: ["bug"] +body: + - type: markdown + attributes: + value: | + ## Type + Bug + + - type: textarea + id: why + attributes: + label: Why + description: Explain the business motivation and impact with respect to current Dirac bottlenecks + validations: + required: true + + - type: dropdown + id: urgency + attributes: + label: Urgency + options: + - Critical + - High + - Medium + - Low + validations: + required: true + + - type: textarea + id: description + attributes: + label: Description + description: What is the bug? What is the expected vs actual behavior? + validations: + required: true + + - type: textarea + id: steps + attributes: + label: Steps to Reproduce + description: How can we reproduce this issue? + validations: + required: true + + - type: textarea + id: additional-context + attributes: + label: Additional Context + description: Screenshots, error messages, environment details, etc. + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml deleted file mode 100644 index 071f1ddb4..000000000 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: Bug Report -description: Create a report to help us improve the Saleor React Storefront -labels: ["type: bug"] -body: - - type: markdown - attributes: - value: | - Thanks for taking the time to fill out this bug report! Using this template makes it a lot easier for us to diagnose your problem, so please fill in as many fields as possible. - - - type: textarea - id: description - attributes: - label: Summary - description: A short description of the problem - placeholder: | - Include what you expected to happen, and what actually happened. - validations: - required: true - - - type: textarea - id: steps-to-reproduce - attributes: - label: Steps to reproduce - description: Steps to reproduce the behavior - placeholder: | - 1. Go to '...' - 2. Click on '....' - 3. Scroll down to '....' - 4. See error - validations: - required: true - - - type: input - id: link-to-reproduction - attributes: - label: A link to a reproduction repository - description: The fastest way to describe your bug is to provide a reproduction repository. - placeholder: https://github.com/project/link-to-your-reproduction-repo - - - type: textarea - id: env - attributes: - label: Output from envinfo - description: | - To get the environment information from your desktop use this command and paste it here: - `npx envinfo --system --binaries --browsers --markdown` - - Please also provide the version of pnpm you're using: - `pnpm --version` diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index e0c78c1bd..000000000 --- a/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,5 +0,0 @@ -blank_issues_enabled: true -contact_links: - - name: Saleor Discussions - url: https://github.com/saleor/storefront/discussions - about: Ask questions and suggest features here. diff --git a/.github/ISSUE_TEMPLATE/feature.yaml b/.github/ISSUE_TEMPLATE/feature.yaml new file mode 100644 index 000000000..b42968fc2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature.yaml @@ -0,0 +1,37 @@ +name: Feature Request +description: Propose a new feature or enhancement +labels: ["feature"] +body: + - type: markdown + attributes: + value: | + ## Type + Feature + + - type: textarea + id: why + attributes: + label: Why + description: Explain the business motivation and impact with respect to current Dirac bottlenecks + validations: + required: true + + - type: dropdown + id: urgency + attributes: + label: Urgency + options: + - Critical + - High + - Medium + - Low + validations: + required: true + + - type: textarea + id: description + attributes: + label: Description + description: What feature are you proposing? What problem does it solve? + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/spike.yaml b/.github/ISSUE_TEMPLATE/spike.yaml new file mode 100644 index 000000000..bd8813080 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/spike.yaml @@ -0,0 +1,45 @@ +name: Spike / Investigation +description: Technical exploration or research task +labels: ["spike"] +body: + - type: markdown + attributes: + value: | + ## Type + Spike + + - type: textarea + id: why + attributes: + label: Why + description: Explain the business motivation and impact with respect to current Dirac bottlenecks + validations: + required: true + + - type: dropdown + id: urgency + attributes: + label: Urgency + options: + - Critical + - High + - Medium + - Low + validations: + required: true + + - type: textarea + id: goal + attributes: + label: Goal + description: What question(s) are we trying to answer? What do we need to learn? + validations: + required: true + + - type: textarea + id: success-criteria + attributes: + label: Success Criteria + description: What does "done" look like for this investigation? + validations: + required: true diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 000000000..23b837d40 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,20 @@ +## Linked Issue + +Closes # + +## Design Decisions + + + +## Checklist +- [ ] Written at least one regression test (if a bug) +- [ ] Checked for existence of or written a smoke test (if one doesn't exist) +- [ ] Read every line of code +- [ ] Started the docker container +- [ ] Checked manually that the fix works +- [ ] Added documentation of design decisions +- [ ] Written CONCISE code diff --git a/.github/workflows/check-linked-issue.yml b/.github/workflows/check-linked-issue.yml new file mode 100644 index 000000000..ec09c2d6e --- /dev/null +++ b/.github/workflows/check-linked-issue.yml @@ -0,0 +1,25 @@ +name: Check Linked Issue + +on: + pull_request: + types: [opened, edited, synchronize] + +jobs: + check-issue-link: + runs-on: ubuntu-latest + steps: + - name: Check for linked issue + uses: actions/github-script@v7 + with: + script: | + const pr = context.payload.pull_request; + const body = pr.body || ''; + + // Check for "Closes #123", "Fixes #123", "Resolves #123", etc. + const issuePattern = /(close[sd]?|fix(es|ed)?|resolve[sd]?)\s+#\d+/i; + + if (!issuePattern.test(body)) { + core.setFailed('❌ PR must be linked to an issue using "Closes #123", "Fixes #123", or "Resolves #123"'); + } else { + console.log('✅ PR is properly linked to an issue'); + }