Skip to content
Merged
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
2 changes: 2 additions & 0 deletions .github/actions/list-pr/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ runs:
if (prs.length > 0) {
const pr_urls = prs.map(pr => pr.html_url);
core.info(`prs: ${pr_urls.join("\n")}`);
} else {
core.warning("No pull requests found!");
}

const result = prs.map(pr => ({
Expand Down
19 changes: 17 additions & 2 deletions .github/workflows/dispatch-event.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,32 @@ on:
schedule:
- cron: '0 12 * * *'

pull_request:
branches:
- 'main'
paths:
- '.github/workflows/dispatch-event.yml'
- '.github/workflows/redispatch-event.yml'
- '.github/actions/list-pr/**'
- '!**/*.md'

workflow_dispatch:
inputs:
labels:
required: false
type: string
default: ''
default: 'module: PrivateUse1'
description: 'The labels on pull requests'
hours:
required: false
type: number
default: 24
description: 'Pull requests created within this many hours will be listed'
limit:
required: false
type: number
default: -1
description: 'How many pull requests will be listed'

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
Expand All @@ -39,10 +53,11 @@ jobs:
token: ${{ secrets.COSDT_BOT_TOKEN }}
owner: pytorch
repository: pytorch
labels: ${{ github.event.inputs.labels || '' }}
labels: "${{ github.event.inputs.labels || 'module: PrivateUse1' }}"
hours: ${{ github.event.inputs.hours || '24' }}

dispatch-pr:
if: ${{ needs.list-pr.outputs.prs != '[]' }}
name: 'Dispatch PR event - #${{ matrix.data.pull_request.number }}'
runs-on: ubuntu-latest
needs:
Expand Down
Loading