generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 58
Readme for robots #390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Readme for robots #390
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# Copilot Instructions | ||
|
||
## Environment Setup | ||
|
||
Bootstrap the project by running: | ||
|
||
```bash | ||
npm install | ||
``` | ||
|
||
## Testing | ||
|
||
Ensure all unit tests pass by running the following: | ||
|
||
```bash | ||
npm run test | ||
``` | ||
|
||
This project should include unit tests for all lines, functions, and branches of code. | ||
|
||
This project **requires 100% test coverage** of code. | ||
|
||
Unit tests should exist in the `__tests__` directory. They are powered by `jest`. | ||
|
||
## Bundling | ||
|
||
The final commit should always be a bundle of the code. This is done by running the following command: | ||
|
||
```bash | ||
npm run all | ||
``` | ||
|
||
This uses Vercel's `ncc` to bundle JS code for running in GitHub Actions. | ||
|
||
## Project Guidelines | ||
|
||
- Follow: | ||
- Object-Oriented best practices, especially abstraction and encapsulation | ||
- GRASP Principles, especially Information Expert, Creator, Indirection, Low Coupling, High Cohesion, and Pure Fabrication | ||
- SOLID principles, especially Dependency Inversion, Open/Closed, and Single Responsibility | ||
- Base new work on latest `main` branch | ||
- Changes should maintain consistency with existing patterns and style. | ||
- Document changes clearly and thoroughly, including updates to existing comments when appropriate. Try to use the same "voice" as the other comments, mimicking their tone and style. | ||
- When responding to code refactoring suggestions, function suggestions, or other code changes, please keep your responses as concise as possible. We are capable engineers and can understand the code changes without excessive explanation. If you feel that a more detailed explanation is necessary, you can provide it, but keep it concise. After doing any refactoring, ensure to run `npm run test` to ensure that all tests still pass. | ||
- When suggesting code changes, always opt for the most maintainable approach. Try your best to keep the code clean and follow 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. | ||
- Hard-coded strings should almost always be constant variables. | ||
- In writing code, take the following as preferences but not rules: | ||
- understandability over concision | ||
- syntax, expressions, and blocks that are common across many languages over language-specific syntax. | ||
- more descriptive names over brevity of variable, function, and class names | ||
- the use of whitespace (newlines) over compactness of files | ||
- naming of variables and methods that lead to expressions and blocks reading more like English sentences. | ||
- less lines of code over more. Keep changes minimal and focused. | ||
|
||
## Pull Request Requirements | ||
|
||
- All tests must pass. | ||
- The linter must pass. | ||
- Documentation must be up-to-date. | ||
- The body of the Pull Request should: | ||
- contain a summary of the changes | ||
- make special note of any changes to dependencies | ||
- comment on the security of the changes being made and offer suggestions for further securing the code | ||
|
||
## Repository Organization | ||
|
||
- `.github/` - GitHub configurations and settings | ||
- `docs/` - Main documentation storage | ||
- `script/` - Repository maintenance scripts | ||
- `src/` - Main code for the project. This is where the main application/service code lives | ||
- `__tests__/` - Tests for the project. This is where the unit tests live | ||
- `dist/` - This is where the JS compiled code lives for the GitHub Action | ||
- `action.yml` - The GitHub Action file. This is where the GitHub Action is defined |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: "Copilot Setup Steps" | ||
|
||
# Allows you to test the setup steps from your repository's "Actions" tab | ||
on: workflow_dispatch | ||
|
||
jobs: | ||
copilot-setup-steps: | ||
runs-on: ubuntu-latest | ||
# Set the permissions to the lowest permissions possible needed for *your steps*. Copilot will be given its own token for its operations. | ||
permissions: | ||
# If you want to clone the repository as part of your setup steps, for example to install dependencies, you'll need the `contents: read` permission. If you don't clone the repository in your setup steps, Copilot will do this for you automatically after the steps complete. | ||
contents: read | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: .node-version | ||
cache: 'npm' | ||
|
||
- name: install dependencies | ||
run: npm install |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use "fewer lines of code" instead of "less lines of code" to correct the grammar.
Copilot uses AI. Check for mistakes.