A GitHub Action which evaluates twoslash bug reproductions in GitHub Issues
Перейти к файлу
Jake Bailey 896a8519c4
Switch CDN for playground build metadata (#47)
2024-12-16 13:52:25 -08:00
.github/workflows Prepare for prod 2020-11-19 07:25:16 -05:00
.vscode Handle creating twoslash code samples 2020-06-30 18:42:56 -04:00
dist Switch CDN for playground build metadata (#47) 2024-12-16 13:52:25 -08:00
docs Update user-facing.md 2020-07-09 14:44:41 -04:00
scripts Post result comment 2022-04-13 15:52:00 -07:00
src Switch CDN for playground build metadata (#47) 2024-12-16 13:52:25 -08:00
.eslintignore Initial commit 2020-06-30 08:00:07 -04:00
.gitignore Set up gitignore 2020-11-19 07:10:35 -05:00
.huskyrc.js Adds husky 2020-07-02 17:18:16 -04:00
.prettierignore Initial commit 2020-06-30 08:00:07 -04:00
.prettierrc.json Handle creating twoslash code samples 2020-06-30 18:42:56 -04:00
CODE_OF_CONDUCT.md Initial CODE_OF_CONDUCT.md commit 2020-06-30 21:14:48 -04:00
LICENSE Use MS license 2020-06-30 21:15:48 -04:00
README.md Bisect improvements 2022-09-12 12:32:35 -07:00
SECURITY.md Initial SECURITY.md commit 2020-06-30 21:15:58 -04:00
action.yml Bisect improvements 2022-09-12 12:32:35 -07:00
jest.config.js Initial commit 2020-06-30 08:00:07 -04:00
package.json Add logging during bisect 2022-09-12 17:01:59 -07:00
tsconfig.json Post result comment 2022-04-13 15:52:00 -07:00
yarn.lock Upgrade @typescript/twoslash and specify lib directory 2022-09-09 14:26:07 -07:00

README.md

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

yarn

Build the typescript and package it for distribution

$ yarn build && yarn pack

Run the tests ✔️

$ yarn test

 PASS  src/__tests__/issuesToTwoslashRuns.test.ts
  ✓ NOOPs with no issues (5ms)
  ...

Run or debug locally

yarn build

GITHUB_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 and push the results:

yarn build
yarn deploy
git add dist
git commit -a -m "prod dependencies"
git push

Your action is now published! 🚀

See the versioning documentation

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. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.