Skip to content

Commit

Permalink
chore: add issue form templates (#817)
Browse files Browse the repository at this point in the history
  • Loading branch information
piksel authored Dec 17, 2022
1 parent 68e2f92 commit c51ef18
Show file tree
Hide file tree
Showing 5 changed files with 182 additions and 17 deletions.
17 changes: 0 additions & 17 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

92 changes: 92 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: 🐛 Bug report
description: Create a report to help us improve
labels: ["bug"]

body:
- type: textarea
id: description
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is
validations:
required: true

- type: input
id: reproduce-code
attributes:
description: |
If possible, the best way to display an issue is by making a reproducable code snippet available at jsfiddle.
Create a dotnet fiddle which reproduces your issue. You can use [this template](https://p1k.se/sharpziplib-repro) or [create a new one](https://dotnetfiddle.net/).
placeholder: https://dotnetfiddle.net/r39r0c0d3
label: Reproduction Code

- type: textarea
id: reproduce-steps
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

- id: expected
type: textarea
attributes:
label: Expected behavior
description: A clear and concise description of what you expected to happen.
validations:
required: true

- id: operating-system
type: dropdown
attributes:
label: Operating System
multiple: true
options:
- Windows
- macOS
- Linux
validations:
required: false

- id: framework
type: dropdown
attributes:
label: Framework Version
multiple: true
options:
- .NET 7
- .NET 6
- .NET 5
- .NET Core v3 and earlier
- .NET Framework 4.x
- Unity
- Other
validations:
required: false

- id: tags
type: dropdown
attributes:
label: Tags
description: What areas are your issue related to?
multiple: true
options:
- ZIP
- GZip
- Tar
- BZip2
- Encoding
- Encryption
- Documentation
- Async
- Performance

- type: textarea
attributes:
label: Additional context
description: Add any other context about the problem here.
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Ask a question
url: https://github.com/icsharpcode/SharpZipLib/discussions/new?category=q-a
about: Post any questions in QA discussions instead of creating an issue
- name: Discuss
url: https://github.com/icsharpcode/SharpZipLib/discussions/new
about: Discuss with other community members
52 changes: 52 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: 💡 Feature request
description: Have a new idea/feature ? Please suggest!
labels: ["enhancement"]
body:
- type: textarea
id: description
attributes:
label: Is your feature request related to a problem? Please describe.
description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
validations:
required: true

- type: textarea
id: solution
attributes:
label: Describe the solution you'd like
description: A clear and concise description of what you want to happen.
validations:
required: true

- type: textarea
id: alternatives
attributes:
label: Describe alternatives you've considered
description: A clear and concise description of any alternative solutions or features you've considered.
validations:
required: true

- id: tags
type: dropdown
attributes:
label: Tags
description: What areas are your feature request related to?
multiple: true
options:
- ZIP
- GZip
- Tar
- BZip2
- Encoding
- Encryption
- Documentation
- Async
- Performance

- type: textarea
id: extrainfo
attributes:
label: Additional context
description: Add any other context or screenshots about the feature request here.
validations:
required: false
30 changes: 30 additions & 0 deletions .github/workflows/issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Apply labels from issue

on:
issues:
types: [opened, edited]

jobs:
Process_Issue:
runs-on: ubuntu-latest
steps:
- name: Parse Issue Forms Body
id: parse
uses: zentered/[email protected]
- name: Apply labels from tags
uses: actions/github-script@v6
env:
PARSED_DATA: "${{ steps.parse.outputs.data }}"
with:
script: |
const parsed = JSON.parse(process.env["PARSED_DATA"]);
const tags = parsed.tags.text;
console.log('Parsed tags:', tags);
const labels = tags.split(',').map( t => t.trim().toLowerCase() );
console.log('Applying labels:', labels);
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels,
})

0 comments on commit c51ef18

Please sign in to comment.