From 9f398e7a5e453c053b28759e30b3fc5ca5a3beac Mon Sep 17 00:00:00 2001 From: ismay Date: Wed, 12 Jun 2024 16:05:38 +0200 Subject: [PATCH] ci: use gh cli to close issues --- .github/workflows/comment-and-close-reusable.yml | 11 +++-------- .github/workflows/comment-and-close.yml | 2 +- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/comment-and-close-reusable.yml b/.github/workflows/comment-and-close-reusable.yml index afb39676..cfc02e3e 100644 --- a/.github/workflows/comment-and-close-reusable.yml +++ b/.github/workflows/comment-and-close-reusable.yml @@ -1,15 +1,10 @@ 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}} + - run: gh issue close --comment 'If you would like to file a bug report or feature request, please refer to our issue tracker: https://dhis2.atlassian.net' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/comment-and-close.yml b/.github/workflows/comment-and-close.yml index 8ee496f7..e7c3f7ca 100644 --- a/.github/workflows/comment-and-close.yml +++ b/.github/workflows/comment-and-close.yml @@ -5,4 +5,4 @@ on: jobs: comment-and-close: uses: ./.github/workflows/comment-and-close-reusable.yml - secrets: inherit + if: ${{ !contains(fromJson('["dhis2-bot", "kodiakhq", "dependabot"]'), github.event.issues.sender.login) }}