Skip to content

Commit 7120b52

Browse files
authoredSep 12, 2022
Update twoslash workflow (#50738)
* Update twoslash workflow * Split conditional checkout
1 parent 68d526c commit 7120b52

File tree

1 file changed

+13
-17
lines changed

1 file changed

+13
-17
lines changed
 

‎.github/workflows/twoslash-repros.yaml

+13-17
Original file line numberDiff line numberDiff line change
@@ -8,35 +8,31 @@ on:
88
- cron: '0 8 * * *'
99
repository_dispatch:
1010
types: run-twoslash-repros
11-
issues:
12-
types:
13-
- labeled
1411
workflow_dispatch:
1512
inputs:
16-
bisect_issue:
17-
description: Triggers a bisect request on the given issue number instead of updating repros on all issues
13+
issue:
14+
description: Limits run to a single issue.
15+
required: false
16+
type: string
17+
bisect:
18+
description: If set, runs a git bisect on an existing repro. Requires 'issue' to be set. Value can be revision labels (e.g. `good v4.7.3 bad main`) or `true` to infer bisect range.
1819
required: false
1920
type: string
2021

2122
jobs:
2223
run:
23-
if: ${{ github.repository == 'microsoft/TypeScript' && !github.event.label && !github.event.inputs.bisect_issue }}
24-
runs-on: ubuntu-latest
25-
steps:
26-
- uses: actions/setup-node@v3
27-
- uses: microsoft/TypeScript-Twoslash-Repro-Action@master
28-
with:
29-
github-token: ${{ secrets.TS_BOT_GITHUB_TOKEN }}
30-
31-
bisect:
32-
if: ${{ github.event.label.name == 'Bisect Repro' || github.event.inputs.bisect_issue }}
24+
if: ${{ github.repository == 'microsoft/TypeScript' }}
3325
runs-on: ubuntu-latest
3426
steps:
35-
- uses: actions/checkout@v3
27+
- if: ${{ github.events.input.bisect }}
28+
uses: actions/checkout@v3
3629
with:
3730
fetch-depth: 0
31+
- if: ${{ !github.events.input.bisect }}
32+
uses: actions/checkout@v3
3833
- uses: actions/setup-node@v3
3934
- uses: microsoft/TypeScript-Twoslash-Repro-Action@master
4035
with:
4136
github-token: ${{ secrets.TS_BOT_GITHUB_TOKEN }}
42-
bisect: ${{ github.event.issue.number || github.event.inputs.bisect_issue }}
37+
issue: ${{ github.event.inputs.issue }}
38+
bisect: ${{ github.event.inputs.bisect }}

0 commit comments

Comments
 (0)
Please sign in to comment.