Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/microsoft/TypeScript-Twoslash-Repro-Action
A GitHub Action which evaluates twoslash bug reproductions in GitHub Issues
https://github.com/microsoft/TypeScript-Twoslash-Repro-Action
Last synced: 3 months ago
JSON representation
A GitHub Action which evaluates twoslash bug reproductions in GitHub Issues
- Host: GitHub
- URL: https://github.com/microsoft/TypeScript-Twoslash-Repro-Action
- Owner: microsoft
- License: mit
- Created: 2020-07-01T01:12:45.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-02-15T00:56:41.000Z (9 months ago)
- Last Synced: 2024-08-20T05:05:46.293Z (3 months ago)
- Language: TypeScript
- Size: 9.1 MB
- Stars: 10
- Watchers: 10
- Forks: 7
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
## Twoslash Verify GitHub Action
Runs as a part of a nightly task in GitHub's CI. This action will:
- Download the last 5 major releases of TypeScript
- Looks through all issues which have a specific label (default: `"Has Repro"`)
- Uses extracts code samples in the issue from markdown in the body and comments (codeblocks with `repro`)
- Loops through the code samples with
- Leave / Updates a comment on the state of all the different results from the twoslash sample## Codebase
All of the code lives in `src`, and the filenames are decided so that they represent the passage of data through the pipeline.
So if its at the top alphabetically, then it's at the top of the process.## To Work On This
Install the dependencies
```bash
yarn
```Build the typescript and package it for distribution
```bash
$ yarn build && yarn pack
```Run the tests :heavy_check_mark:
```bash
$ yarn testPASS src/__tests__/issuesToTwoslashRuns.test.ts
✓ NOOPs with no issues (5ms)
...
```Run or debug locally
```bash
yarn buildGITHUB_WORKSPACE=/absolute/path/to/TypeScript \
GITHUB_TOKEN=$token \ # will comment without DRY!
DRY=1 \ # do not post results comment
ISSUE=50635 \ # optional
BISECT="good 4.7.3 bad main" \ # optional
node lib/_main.js
```## To publish
Actions are run from GitHub repos so we will check-in the packed dist folder.
Then run [ncc](https://github.com/zeit/ncc) and push the results:
```bash
yarn build
yarn deploy
git add dist
git commit -a -m "prod dependencies"
git push
```Your action is now published! :rocket:
See the [versioning documentation](https://github.com/actions/toolkit/blob/master/docs/action-versioning.md)
# Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.When you submit a pull request, a CLA bot will automatically determine whether you need to provide
a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions
provided by the bot. You will only need to do this once across all repos using our CLA.This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
contact [[email protected]](mailto:[email protected]) with any additional questions or comments.