Skip to content

Commit

Permalink
Implement feture to skip issue creation if there is at least alredy o…
Browse files Browse the repository at this point in the history
…pened
  • Loading branch information
pawelpasterz committed Dec 1, 2020
1 parent 90d825b commit e073cbb
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/it_failed_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Full suite IT test report
about: Report failed IT tests
title: Full Suite integration tests failed on master [{{ env.RUN_DATE }}]
labels: bug
labels: bug, IT_Failed
---
### Integration Test failed on master
**Timestamp:** {{ env.RUN_DATE }}
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/full_suite_integration_tests_cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,20 @@ jobs:
with:
arguments: "integrationTests"

- name: Check for opened issues
if: ${{ failure() }}
id: check-opened
run: |
resp=$(curl -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/Flank/flank/issues?creator=github-actions[bot]&state=open&labels=IT_Failed" | jq .)
echo $resp
SHOULD_RUN='false'
if [ $resp = "[]" ]; then
SHOULD_RUN='true'
fi
echo "::set-output name=should_create::${SHOULD_RUN}"
- uses: JasonEtco/create-an-issue@v2
if: failure()
if: ${{ failure() && steps.check-opened.outputs.should_create == 'true' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RUN_DATE: ${{ steps.current-time.outputs.formattedTime }}
Expand Down

0 comments on commit e073cbb

Please sign in to comment.