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
10 changes: 5 additions & 5 deletions .github/actions/list-pr/action.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'List Pull Requests'
name: 'List pull requests'
description: 'list and put output pull requests'
inputs:
owner:
Expand Down Expand Up @@ -34,16 +34,16 @@ runs:
github-token: ${{ inputs.token }}
result-encoding: string
script: |
const timeRange = parseInt("24") * 60 * 60 * 1000;
const timeRange = parseInt("${{ inputs.hours }}") * 60 * 60 * 1000;
const sinceTime = new Date(Date.now() - timeRange).toISOString();
const input_labels = "";
const input_labels = "${{ inputs.labels }}";
const labels = input_labels
? input_labels.split(/[,\n]/).map(label => label.trim())
: [];

const iterator = await github.paginate.iterator(github.rest.pulls.list, {
owner: "pytorch",
repo: "pytorch",
owner: "${{ inputs.owner }}",
repo: "${{ inputs.repository }}",
state: "open",
sort: "created",
direction: "desc",
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/ascend_npu_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ on:

# Only cancel the previous runs when triggered by a pull_request event
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
group: ${{ github.workflow }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
Expand All @@ -83,6 +83,7 @@ jobs:
image: ${{ steps.set-env.outputs.image }}
device: ${{ steps.set-env.outputs.device }}
ref: ${{ steps.list-ref.outputs.ref }}
pr-number: ${{ steps.list-ref.outputs.pr_number }}
steps:
- name: Set environment params
id: set-env
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/dispatch-event.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
name: 'Dispatch PyTorch events'

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

schedule:
- cron: '0 12 * * *'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/redispatch-event.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
redispatch-pr-event:
name: Redispatch PyTorch events
name: 'Redispatch PyTorch events for #${{ github.event.client_payload.pull_request.number }}'
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
Loading