typescript-action
Copilot instructions2.4k starsChanged 16 months agoMITView on GitHub
This GitHub Action is written in TypeScript and transpiled to JavaScript. Both the TypeScript sources and the generated JavaScript code are contained in this repository. The TypeScript sources are contained in the src directory and the JavaScript code is contained in the dist directory. A GitHub Actions workflow checks that the JavaScript code in dist is up-to-date. Therefore, you should not review any changes to the contents of the dist folder and it is expected that the JavaScript code in…
- Reads credentials
- Installs packages
We split this copilot-instructions.md into the rules it gives an agent
19 rules. About 1 is common, 16 are distinctive, and 2 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈16
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 51
Ensure all unit tests pass by running:
- Distinctive: line 71
Follow standard TypeScript and JavaScript coding conventions and best practices
- Distinctive: line 74
Document changes clearly and thoroughly, including updates to existing comments when appropriate
- Distinctive: line 76
Do not include basic, unnecessary comments that simply restate what the code is doing (focus on explaining _why_, not _what_)
- Common: line 78
Use consistent error handling patterns throughout the codebase
- Distinctive: line 79
Use TypeScript's type system to ensure type safety and clarity
- Distinctive: line 80
Keep functions focused and manageable
- Distinctive: line 81
Use descriptive variable and function names that clearly convey their purpose
- Distinctive: line 82
Use JSDoc comments to document functions, classes, and complex logic
- Very specific: line 83
After doing any refactoring, ensure to run npm run test to ensure that all tests still pass and coverage requirements are met
- Distinctive: line 85
When suggesting code changes, always opt for the most maintainable approach.
- Distinctive: line 88
Avoid unnecessary complexity and always consider the long-term maintainability of the code
- Distinctive: line 90
When writing unit tests, try to consider edge cases as well as the main path of success.
- Very specific: line 93
Use the @actions/core package for logging over console to ensure compatibility with GitHub Actions logging features
- Distinctive: line 105
When creating a pull request (PR), please ensure that:
- Distinctive: line 107
Keep changes focused and minimal (avoid large changes, or consider breaking them into separate, smaller PRs)
- Distinctive: line 114
If necessary, the README.md file is updated to reflect any changes in functionality or usage
- Distinctive: line 126
When performing a code review, please follow these guidelines:
- Distinctive: line 128
If there are changes that modify the functionality/usage of the action, validate that there are changes in the README.md file that document …
≈ “Common” is an estimate: at least 1 in 5 of the 3,669 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Copilot Instructions
This GitHub Action is written in TypeScript and transpiled to JavaScript. Both
the TypeScript sources and the generated JavaScript code are contained in
this repository. The TypeScript sources are contained in the src directory and
the JavaScript code is contained in the dist directory. A GitHub Actions
workflow checks that the JavaScript code in dist is up-to-date. Therefore, you
should not review any changes to the contents of the dist folder and it is
expected that the JavaScript code in dist closely mirrors the TypeScript code
it is generated from.
Repository Structure
| Path | Description |
__fixtures__/ | Unit Test Fixtures |
__tests__/ | Unit Tests |
.devcontainer/ | Development Container Configuration |
.github/ | GitHub Configuration |
.licenses/ | License Information |
.vscode/ | Visual Studio Code Configuration |
badges/ | Badges for readme |
dist/ | Generated JavaScript Code |
src/ | TypeScript Source Code |
.env.example | Environment Variables Example for @github/local-action |
.licensed.yml | Licensed Configuration |
.markdown-lint.yml | Markdown Linter Configuration |
.node-version | Node.js Version Configuration |
.prettierrc.yml | Prettier Formatter Configuration |
.yaml-lint.yml | YAML Linter Configuration |
action.yml | GitHub Action Metadata |
CODEOWNERS | Code Owners File |
eslint.config.mjs | ESLint Configuration |
jest.config.js | Jest Configuration |
LICENSE | License File |
package.json | NPM Package Configuration |
README.md | Project Documentation |
rollup.config.ts | Rollup Bundler Configuration |
tsconfig.json | TypeScript Configuration |
Environment Setup
Install dependencies by running:
npm installTesting
Ensure all unit tests pass by running:
npm run testUnit tests should exist in the __tests__ directory. They are powered by
jest. Fixtures should be placed in the __fixtures__ directory.
Bundling
Any time files in the src directory are changed, you should run the following
command to bundle the TypeScript code into JavaScript:
npm run bundleGeneral Coding Guidelines
- Follow standard TypeScript and JavaScript coding conventions and best practices
- Changes should maintain consistency with existing patterns and style
- Document changes clearly and thoroughly, including updates to existing comments when appropriate
- Do not include basic, unnecessary comments that simply restate what the code is doing (focus on explaining why, not what)
- Use consistent error handling patterns throughout the codebase
- Use TypeScript's type system to ensure type safety and clarity
- Keep functions focused and manageable
- Use descriptive variable and function names that clearly convey their purpose
- Use JSDoc comments to document functions, classes, and complex logic
- After doing any refactoring, ensure to run
npm run testto ensure that all tests still pass and coverage requirements are met - When suggesting code changes, always opt for the most maintainable approach. Try your best to keep the code clean and follow "Don't Repeat Yourself" (DRY) principles
- Avoid unnecessary complexity and always consider the long-term maintainability of the code
- When writing unit tests, try to consider edge cases as well as the main path of success. This will help ensure that the code is robust and can handle unexpected inputs or situations
- Use the
@actions/corepackage for logging overconsoleto ensure compatibility with GitHub Actions logging features
Versioning
GitHub Actions are versioned using branch and tag names. Please ensure the
version in the project's package.json is updated to reflect the changes made
in the codebase. The version should follow
Semantic Versioning principles.
Pull Request Guidelines
When creating a pull request (PR), please ensure that:
- Keep changes focused and minimal (avoid large changes, or consider breaking them into separate, smaller PRs)
- Formatting checks pass
- Linting checks pass
- Unit tests pass and coverage requirements are met
- The action has been transpiled to JavaScript and the
distdirectory is up-to-date with the latest changes in thesrcdirectory - If necessary, the
README.mdfile is updated to reflect any changes in functionality or usage
The body of the PR should include:
- A summary of the changes
- A special note of any changes to dependencies
- A link to any relevant issues or discussions
- Any additional context that may be helpful for reviewers
Code Review Guidelines
When performing a code review, please follow these guidelines:
- If there are changes that modify the functionality/usage of the action,
validate that there are changes in the
README.mdfile that document the new or modified functionality
Trending
Quiet this year.thin dataabout the whole repository
Who's talking about actions/typescript-action
- coverallsapp/github-action“Upgrade all libraries and required nodejs version ”GitHub · Dec 24, 2022 · 21 reactions
- actions/toolkit“@actions/glob - Outdated minimatch dependency”GitHub · Feb 14, 2025 · 7 reactions
- Sibz/github-status-action“attempt to use node 16”GitHub · Oct 11, 2022 · 7 reactions
- Azure/login“move pre cleanup to main and add pre-if and post-if”GitHub · Sep 13, 2024 · 3 reactions
- rdagumampan/yuniql“Distribute yuniql as GitHub Action in GitHub Market Place”GitHub · Jan 1, 2021 · 3 reactions
The biggest 5 of 6 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 6
Talked about on GitHub and Bluesky (6 times).
On GitHub · 5
- Dec 24, 2022Upgrade all libraries and required nodejs version — coverallsapp/github-action21 reactions · 15 comments
- Feb 14, 2025@actions/glob - Outdated minimatch dependency — actions/toolkit7 reactions · 1 comment
- Oct 11, 2022attempt to use node 16 — Sibz/github-status-action7 reactions · 2 comments
- Sep 13, 2024move pre cleanup to main and add pre-if and post-if — Azure/login3 reactions · 1 comment
- Jan 1, 2021Distribute yuniql as GitHub Action in GitHub Market Place — rdagumampan/yuniql3 reactions
On Bluesky · 1
- Aug 10, 2024typescript-action テンプレート使ってみた たしかにサクッと作れるけど、色々設定等々モリモリ過ぎてやや too much だった github.com/actions/type... — @koki.me1 likes and repost · 1 reply
Where files are headingNew Copilot instructions files have more rules about branches and pull requests, and fewer about code style.
Of the Copilot instructions files we read, the 2,297 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

