Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Tries to separate GitHub issues + external PRs monitor into two workflows #18021

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/github-external-pr-monitor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: "GitHub external PRs Monitor"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would convert this into a composite action, See https://github.com/MystenLabs/sui-operations/blob/main/.github/actions/slack-message/action.yml as an example.

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 # [email protected]
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}}"}'

17 changes: 1 addition & 16 deletions .github/workflows/github-issues-monitor.yml
Original file line number Diff line number Diff line change
@@ -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 # [email protected]
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'
Expand Down
Loading