From f52ef436fb3e398d006222ed81122962a1d7fc99 Mon Sep 17 00:00:00 2001 From: stefan-mysten <135084671+stefan-mysten@users.noreply.github.com> Date: Thu, 9 May 2024 12:59:30 -0700 Subject: [PATCH] [CI] Github issues & external PRs fix (#17616) ## Description If conditions only work at job level, and not at step level. ## Test plan How did you test the new or updated feature? --- ## Release notes Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required. For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates. - [ ] Protocol: - [ ] Nodes (Validators and Full nodes): - [ ] Indexer: - [ ] JSON-RPC: - [ ] GraphQL: - [ ] CLI: - [ ] Rust SDK: --- .github/workflows/github-issues-monitor.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/github-issues-monitor.yml b/.github/workflows/github-issues-monitor.yml index 9e70863357ee2..8a158a47f5cc0 100644 --- a/.github/workflows/github-issues-monitor.yml +++ b/.github/workflows/github-issues-monitor.yml @@ -7,20 +7,24 @@ on: types: [opened] jobs: - notify: - name: Dispatch workflow to notify slack channel + notify-prs: + name: Dispatch workflow to notify slack channel on PRs + if: github.event_name == 'pull_request' runs-on: ubuntu-latest steps: - name: Dispatch github-issues-external-prs-monitor in MystenLabs/sui-operations - if: ${{github.event_name == 'pull_request'}} uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # pin@v3.0.0 with: repository: MystenLabs/sui-operations event-type: github-issues-external-prs-monitor client-payload: '{"author": "${{github.event.pull_request.user.login}}", "event_name": "pull_request", "pull_request_number": "${{github.event.pull_request.number}}"}' + notify-issues: + name: Dispatch workflow to notify slack channel on issues + if: github.event_name == 'issues' + runs-on: ubuntu-latest + steps: - name: Dispatch github-issues-external-prs-monitor in MystenLabs/sui-operations - if: ${{github.event_name == 'issues'}} uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # pin@v3.0.0 with: repository: MystenLabs/sui-operations