From 3b788405e7407dd014232f5fe660679ef045c464 Mon Sep 17 00:00:00 2001 From: stefan-mysten <135084671+stefan-mysten@users.noreply.github.com> Date: Fri, 31 May 2024 16:36:05 -0700 Subject: [PATCH] Fixes --- .../workflows/github-external-pr-monitor.yml | 18 ++++++++++++++++++ .github/workflows/github-issues-monitor.yml | 17 +---------------- 2 files changed, 19 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/github-external-pr-monitor.yml diff --git a/.github/workflows/github-external-pr-monitor.yml b/.github/workflows/github-external-pr-monitor.yml new file mode 100644 index 0000000000000..baa027b41daa9 --- /dev/null +++ b/.github/workflows/github-external-pr-monitor.yml @@ -0,0 +1,18 @@ +name: "GitHub external PRs Monitor" +on: +- pull_request_target + +jobs: + notify-prs: + name: Dispatch workflow to notify slack channel on PRs + runs-on: ubuntu-latest + steps: + - name: Dispatch github-issues-external-prs-monitor in MystenLabs/sui-operations + uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # pin@v3.0.0 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + repository: MystenLabs/sui-operations + token: ${{ secrets.DOCKER_BINARY_BUILDS_DISPATCH }} + 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}}"}' + diff --git a/.github/workflows/github-issues-monitor.yml b/.github/workflows/github-issues-monitor.yml index db3794ad4f2d1..72ccfb5778f29 100644 --- a/.github/workflows/github-issues-monitor.yml +++ b/.github/workflows/github-issues-monitor.yml @@ -1,25 +1,10 @@ -name: GitHub Issues and External PRs Monitor +name: GitHub Issues Monitor on: issues: types: [opened] - pull_request_target: - types: [opened] jobs: - 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 - uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # pin@v3.0.0 - with: - repository: MystenLabs/sui-operations - token: ${{ secrets.DOCKER_BINARY_BUILDS_DISPATCH }} - 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'