Skip to content

Commit

Permalink
(Chore) Adding workflow to synch issues to JIRA (#72)
Browse files Browse the repository at this point in the history
* Adding workflow to synch issues to JIRA

* Surrounging issue title with double-quotes

* Create issues only for failures on main branch
  • Loading branch information
Gmerold authored Sep 29, 2023
1 parent 748d9cd commit 4438015
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci_pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

create-issue:
runs-on: ubuntu-latest
if: ${{ always() && contains(join(needs.*.result, ','), 'failure') }}
if: ${{ always() && github.ref_name == 'main' && contains(join(needs.*.result, ','), 'failure') }}
needs: [ lint-report, static-analysis, integration-test ]
steps:
- name: Check whether the issue already exists
Expand All @@ -39,7 +39,7 @@ jobs:
uses: dacbd/create-issue-action@main
with:
token: ${{ github.token }}
title: CI run failed
title: "[sdcore-tests] CI run failed"
body: |
### Context
[Failed Run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/issues.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Sync Issues to JIRA

on:
issues:
types: [opened, reopened, closed]

jobs:
update:
name: Update Issue
uses: canonical/sdcore-github-workflows/.github/workflows/issues.yaml@main
secrets: inherit

0 comments on commit 4438015

Please sign in to comment.