-
Notifications
You must be signed in to change notification settings - Fork 448
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add issue templates and workflow for JIRA (#4100)
Signed-off-by: Sergio Schvezov <sergio.schvezov@canonical.com>
- Loading branch information
1 parent
cb12ef9
commit 8868527
Showing
4 changed files
with
145 additions
and
3 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }}" |