From a670ffdefe1c8804221ea05b76e7fbac5f3087c8 Mon Sep 17 00:00:00 2001 From: ismay Date: Wed, 12 Jun 2024 15:27:28 +0200 Subject: [PATCH] ci: add reusable issue workflow --- .github/workflows/comment-and-close-reusable.yml | 15 +++++++++++++++ .github/workflows/comment-and-close.yml | 9 ++------- 2 files changed, 17 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/comment-and-close-reusable.yml diff --git a/.github/workflows/comment-and-close-reusable.yml b/.github/workflows/comment-and-close-reusable.yml new file mode 100644 index 000000000..afb396768 --- /dev/null +++ b/.github/workflows/comment-and-close-reusable.yml @@ -0,0 +1,15 @@ +on: + workflow_call: + secrets: + DHIS2_BOT_GITHUB_TOKEN: + required: true + +jobs: + comment-and-close: + runs-on: ubuntu-latest + steps: + - uses: vardevs/candc@v1 + with: + close-comment: 'If you would like to file a bug report or feature request, please refer to our issue tracker: https://dhis2.atlassian.net' + exempt-users: dhis2-bot,dependabot,kodiakhq + github-token: ${{secrets.DHIS2_BOT_GITHUB_TOKEN}} diff --git a/.github/workflows/comment-and-close.yml b/.github/workflows/comment-and-close.yml index 6aa782a08..8ee496f71 100644 --- a/.github/workflows/comment-and-close.yml +++ b/.github/workflows/comment-and-close.yml @@ -4,10 +4,5 @@ on: jobs: comment-and-close: - runs-on: ubuntu-latest - steps: - - uses: vardevs/candc@v1 - with: - close-comment: 'If you would like to file a bug report or feature request, please refer to our issue tracker: https://jira.dhis2.org' - exempt-users: dhis2-bot,dependabot,kodiakhq - github-token: ${{secrets.DHIS2_BOT_GITHUB_TOKEN}} + uses: ./.github/workflows/comment-and-close-reusable.yml + secrets: inherit