From d4bc289233fda99302403a79055581d9be32ec20 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Fri, 8 Jan 2021 10:01:25 +0100 Subject: [PATCH] Refine GitHub actions. Don't automatically create cards for dependency upgrades. Skip feedback from spring issuemaster. Add hook for closed cards to avoid closed cards lingering in the inbox. See #1342 --- .github/workflows/project.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/project.yml b/.github/workflows/project.yml index 307153b0..68823782 100644 --- a/.github/workflows/project.yml +++ b/.github/workflows/project.yml @@ -4,7 +4,7 @@ name: Spring Data GitHub Issues on: issues: - types: [opened, edited, reopened] + types: [opened, edited, reopened, closed] issue_comment: types: [created] pull_request: @@ -13,7 +13,7 @@ on: jobs: Inbox: runs-on: ubuntu-latest - if: github.repository_owner == 'spring-projects' && (github.event.action == 'opened' || github.event.action == 'reopened') && github.event.pull_request == null + if: github.repository_owner == 'spring-projects' && (github.event.action == 'opened' || github.event.action == 'reopened') && github.event.pull_request == null && !contains(join(github.event.issue.labels.*.name, ', '), 'dependency-upgrade') steps: - name: Create or Update Issue Card uses: peter-evans/create-or-update-project-card@v1.1.2 @@ -22,6 +22,17 @@ jobs: column-name: 'Inbox' project-location: 'spring-projects' token: ${{ secrets.GH_ISSUES_TOKEN_SPRING_DATA }} + Done: + runs-on: ubuntu-latest + if: (github.event.action == 'closed') && github.event.pull_request == null + steps: + - name: Update Issue Card + uses: peter-evans/create-or-update-project-card@v1.1.2 + with: + project-name: 'Spring Data' + column-name: 'Done' + project-location: 'spring-projects' + token: ${{ secrets.GH_ISSUES_TOKEN_SPRING_DATA }} Pull-Request: runs-on: ubuntu-latest if: github.repository_owner == 'spring-projects' && (github.event.action == 'opened' || github.event.action == 'reopened') && github.event.pull_request != null @@ -36,7 +47,7 @@ jobs: token: ${{ secrets.GH_ISSUES_TOKEN_SPRING_DATA }} Feedback-Provided: runs-on: ubuntu-latest - if: github.repository_owner == 'spring-projects' && github.event.action == 'created' && contains(join(github.event.issue.labels.*.name, ', '), 'waiting-for-feedback') + if: github.repository_owner == 'spring-projects' && github.event_name == 'issue_comment' && github.event.action == 'created' && !github.actor == 'spring-issuemaster' && github.event.pull_request == null && github.event.issue.state == 'open' && contains(join(github.event.issue.labels.*.name, ', '), 'waiting-for-feedback') steps: - name: Update Project Card uses: peter-evans/create-or-update-project-card@v1.1.2