diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index cc082ebbd3..0000000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,3 +0,0 @@ -**Please log issues on the project's [bug tracker](https://bugs.launchpad.net/snapcraft)** - -Alternatively, If you are looking for support, try [posting on the forums](https://forum.snapcraft.io) diff --git a/.github/ISSUE_TEMPLATE/bug.yaml b/.github/ISSUE_TEMPLATE/bug.yaml new file mode 100644 index 0000000000..8b80a8c3b4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.yaml @@ -0,0 +1,65 @@ +name: Bug Report +description: File a bug report +labels: ["Type: Bug", "Status: Triage"] +body: + - type: markdown + attributes: + value: > + Thanks for taking the time to fill out this bug report! Before + submitting your issue, make sure this has not been already + reported or if it works with the latest published version + of Snapcraft. + - type: textarea + id: bug-description + attributes: + label: Bug Description + description: > + If applicable, add screenshots to help explain your + problem. + validations: + required: true + - type: textarea + id: reproduction + attributes: + label: To Reproduce + description: > + Provide a step-by-step instruction of how to reproduce the behavior. + validations: + required: true + - type: textarea + id: environment + attributes: + label: Environment + description: > + We need to know a bit more about the context in which Snapcraft failed. + - Are you running Snapcraft in destructive-mode, using LXD or Multipass. + - On what system is Snapcraft running (e.g.; Ubuntu 22.04 LTS, Windows 11, + OS X 10.15). + validations: + required: true + - type: textarea + id: snapcraft.yaml + attributes: + label: snapcraft.yaml + description: > + If possible, please paste your snapcraft.yaml contents. This + will be automatically formatted into code, so no need for + backticks. + render: shell + validations: + required: true + - type: textarea + id: logs + attributes: + label: Relevant log output + description: > + Please copy and paste any relevant log output. This will be + automatically formatted into code, so no need for backticks. + render: shell + validations: + required: true + - type: textarea + id: additional-context + attributes: + label: Additional context + diff --git a/.github/ISSUE_TEMPLATE/task.yaml b/.github/ISSUE_TEMPLATE/task.yaml new file mode 100644 index 0000000000..c7d77771d6 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/task.yaml @@ -0,0 +1,27 @@ +name: Task +description: File an enhancement proposal +labels: ["Type: Task", "Status: Triage"] +body: + - type: markdown + attributes: + value: > + Thanks for taking the time to fill out this enhancement + proposal! Before submitting your issue, please make sure there + isn't already a prior issue concerning this. If there is, + please join that discussion instead. + - type: textarea + id: enhancement-proposal + attributes: + label: What needs to get done + description: > + Describe what needs to get done + validations: + required: true + - type: textarea + id: enhancement-proposal + attributes: + label: Why it needs to get done + description: > + Describe why it needs to get done + validations: + required: true diff --git a/.github/workflows/issues.yaml b/.github/workflows/issues.yaml new file mode 100644 index 0000000000..5178c37629 --- /dev/null +++ b/.github/workflows/issues.yaml @@ -0,0 +1,53 @@ +name: Issues + +on: [issues] + +jobs: + update: + name: Update Issue + runs-on: ubuntu-latest + steps: + - name: Dump Github Context + run: | + echo "update=false" >> $GITHUB_ENV + if [ ${{ github.event_name }} != "issues" ]; then + echo "This action only operates on issues" + exit 0 + fi + echo "update=true" >> $GITHUB_ENV + - name: Determine action + run: | + if [ ${{ github.event.action }} == "opened" ]; then + echo "action=open" >> $GITHUB_ENV + fi + if [ ${{ github.event.action }} == "reopened" ]; then + echo "action=reopen" >> $GITHUB_ENV + fi + if [ ${{ github.event.action }} == "closed" ]; then + echo "action=close" >> $GITHUB_ENV + fi + - name: Determine type + run: | + if ${{ contains(github.event.*.labels.*.name, 'Type: Bug') }}; then + echo "type=bug" >> $GITHUB_ENV + else + echo "type=story" >> $GITHUB_ENV + fi + - name: Update + if: ${{ env.update == 'true' }} + env: + ID: ${{ github.event.issue.html_url }} + TITLE: ${{github.event.issue.title }} + COMPONENT: Snapcraft + DESCRIPTION: Opened by ${{ github.event.issue.user.login }}. + run: | + data=$(jq -n \ + --arg id "$ID" \ + --arg action "${{ env.action }}" \ + --arg title "$TITLE" \ + --arg description "$DESCRIPTION" \ + --arg component "$COMPONENT" \ + --arg type "${{ env.type }}" \ + '{data: {id: $id, action: $action, title: $title, description: $description, component: $component, type: $type}}') + + curl -X POST -H 'Content-type: application/json' --data "${data}" "${{ secrets.JIRA_URL }}"