Skip to content

Commit

Permalink
Create an issue if an on push gradle check fails. (#5979)
Browse files Browse the repository at this point in the history
* Create an issue if an on push gradle check fails.

Signed-off-by: Marc Handalian <[email protected]>

* Add assignees.

Signed-off-by: Marc Handalian <[email protected]>

Signed-off-by: Marc Handalian <[email protected]>
  • Loading branch information
mch2 authored Jan 24, 2023
1 parent 1ad344a commit ad8ea03
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/failed_check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: Gradle Check Failure.
labels: >test-failure bug
---

A gradle check workflow has failed after merge.

PR: {{ env.workflow_url }}
CommitId: {{ env.pr_from_sha }}
10 changes: 10 additions & 0 deletions .github/workflows/gradle-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
permissions:
contents: read # to fetch code (actions/checkout)
pull-requests: write # to create or update comment (peter-evans/create-or-update-comment)
issues: write # To create an issue if check fails on push.

runs-on: ubuntu-latest
timeout-minutes: 130
Expand Down Expand Up @@ -123,3 +124,12 @@ jobs:
* **CommitID:** ${{ env.pr_from_sha }}
Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green.
Is the failure [a flaky test](https://github.com/opensearch-project/OpenSearch/blob/main/DEVELOPER_GUIDE.md#flaky-tests) unrelated to your change?
- name: Create Issue On Push Failure
if: ${{ github.event_name == 'push' && failure() }}
uses: dblock/create-a-github-issue@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
assignees: ${{ github.event.head_commit.author.username }}, ${{ github.triggering_actor }}
filename: .github/ISSUE_TEMPLATE/failed_check.md

0 comments on commit ad8ea03

Please sign in to comment.