-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Triggering TypeScript Bot
If you're a TS maintainer, you can respond to a PR with a comment similar to
@typescript-bot [test command]
to trigger a specialized on-demand build on the PR.
The following command triggers a set of the more common on-demand tests:
@tyepscript-bot test it
This will trigger the test top400
, user test this
, run dt
, perf test this faster
commands.
The currently recognized commands are:
-
run dt
- The runs the definitely typed linter using the PR TS build sharded across 4 worker containers (this takes around 25 minutes). -
run dt slower
- This is the same as the above, but only on a single worker (this takes around 90 minutes). This is useful if the results aren't needed promptly and the build queue is busy. -
user test this
- This runs the nightly-testeduser
suite against the PR and against main (this takes around 30 minutes). The bot will post a summary comment comparing results from the two. -
user test tsserver
- This runs the nightly-testeduser
suite against the PR and against main (this takes around 30 minutes). The bot will post a summary comment comparing results from the two. This variant also tests tsserver, not just tsc. -
user test this slower
- The older version of the user tests, and run on only a single container, meaning it takes around 1h 30m. The nightly run is run using this build. -
test top100
- This runs the top 100 TypeScript repos on GitHub, by stars, against the PR and against main (this takes around 30 minutes). The bot will post a summary comment comparing results from the two.Note that
100
can be replaced with any other number up to 3 digits. For example,test top200
,test top50
, ortest top999
will all work. -
test tsserver top100
- This runs the top 100 TypeScript repos on GitHub, by stars, against the PR and against main (this takes around 30 minutes). The bot will post a summary comment comparing results from the two. This variant tests tsserver, not tsc.Note that
100
can be replaced with any other number up to 3 digits. For example,test top200
,test top50
, ortest top999
will all work. -
perf test
- This queues a build on our perf server using the code from the PR - once started (which will only happen once any currently running build is done), this takes around 25 minutes. The bot should post the results of the perf test run back into the triggering PR once done. -
perf test faster
- This is the same as the above, but only runs tsc tests. -
pack this
- This creates a build which does a build, runs an LKG, runs normal tests, and then packs the result into an installable tarball (which can be downloaded from the build artifacts on the azure pipelines build status page), perfect for installing withnpm i <URL to tarball>
to test with. -
cherry-pick this to branchname
- This launches a task to squash the commits from the PR and then open a new PR that cherry-picks the change into branchbranchname
. This takes about 5 minutes as the build agent needs to clone the input PR. The bot should reply if something goes wrong, or otherwise once the new PR is open. -
cherry-pick this to branchname and LKG
- Same as above, but an LKG commit will be added onto the PR after the squashed cherry-pick commit. -
run repros
- Triggers inline code repro workflow
In addition, there are a small suite of commands which work in any comment and relate to release management. You can see how these are typically used in our documented comment command sequence:
-
create release-X.Y
This makes arelease-X.Y
branch (replaceX.Y
with your desired version) with thepackage.json
version set toX.Y.0-beta
, thecorePublic
versionMajorMinor
set toX.Y
, and the fullts.version
string set toX.Y.0-beta
, and updates the accompanying baselines. An LKG is then performed. This new branch is directly pushed tomicrosoft/TypeScript
. In short, this fully sets up a new release branch to be ready to publish a beta. -
bump release-X.Y
This bumps the version (0-beta
->1-rc
->2
->3
and so on) on the specified branch and captures a new LKG, essentially preparing the branch for a new release. -
sync release-X.Y
This mergesmaster
into the specified branch; this is useful for syncing the branch withmaster
in the period between the beta and rc.
A single comment may contain multiple commands, so long as each is prefixed with a call to @typescript-bot
.
The source of the webhook running the bot is currently available here.
Here is the usual invocation of all the useful bot commands at once:
@typescript-bot test top100
@typescript-bot test tsserver top100
@typescript-bot user test this
@typescript-bot user test tsserver
@typescript-bot run dt
@typescript-bot perf test this
@typescript-bot pack this
You can put this into a saved reply so it's easily accessible.
News
Debugging TypeScript
- Performance
- Performance-Tracing
- Debugging-Language-Service-in-VS-Code
- Getting-logs-from-TS-Server-in-VS-Code
- JavaScript-Language-Service-in-Visual-Studio
- Providing-Visual-Studio-Repro-Steps
Contributing to TypeScript
- Contributing to TypeScript
- TypeScript Design Goals
- Coding Guidelines
- Useful Links for TypeScript Issue Management
- Writing Good Design Proposals
- Compiler Repo Notes
- Deployment
Building Tools for TypeScript
- Architectural Overview
- Using the Compiler API
- Using the Language Service API
- Standalone Server (tsserver)
- TypeScript MSBuild In Depth
- Debugging Language Service in VS Code
- Writing a Language Service Plugin
- Docker Quickstart
FAQs
The Main Repo