Skip to content

Commit fe99663

Browse files
chore: add copilot instructions and agent setup steps workflow (#38)
* chore: add copilot instructions and agent setup steps workflow * fix formatting * Fix errors
1 parent 3b6c75e commit fe99663

File tree

2 files changed

+64
-0
lines changed

2 files changed

+64
-0
lines changed

.github/copilot-instructions.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# GitHub Action: Text Variables
2+
3+
This is a JavaScript-based GitHub Action that replaces mustache-style variables
4+
(`{{ variable }}`) in text templates. The action is designed to enable dynamic
5+
content creation for GitHub workflows, particularly for customizing Issue/PR
6+
descriptions, comments, and other text content.
7+
8+
## Code Standards
9+
10+
### Required Before Each Commit
11+
12+
- Run `npm run format:write` to format code with Prettier
13+
- Run `npm run lint` to check code with ESLint
14+
- Run `npm run test` to execute all tests
15+
- Run `npm run all` to run the complete validation pipeline (format, lint, test,
16+
coverage, package)
17+
18+
## Repository Structure
19+
20+
- `src/`: Core JavaScript source code
21+
- `index.js`: Entry point for the action
22+
- `main.js`: Main logic for template processing and variable replacement
23+
- `__tests__/`: Jest test files and sample templates
24+
- `action.yml`: GitHub Action metadata and input/output definitions
25+
- `dist/`: Compiled/bundled output (generated, do not edit directly)
26+
27+
## Code Quality
28+
29+
1. Follow JavaScript best practices and Node.js conventions
30+
1. Use async/await for asynchronous operations
31+
1. Write comprehensive Jest tests for unit testing.
32+
1. Write integration tests for end-to-end validation of the GitHub Action using
33+
workflows in `.github/workflows/ci.yml`
34+
1. Use descriptive variable names and add comments for complex logic
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: 'Copilot Setup Steps'
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
paths:
7+
- .github/workflows/copilot-setup-steps.yml
8+
pull_request:
9+
paths:
10+
- .github/workflows/copilot-setup-steps.yml
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
17+
copilot-setup-steps:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v4
22+
23+
- name: Set up Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version-file: .node-version
27+
cache: 'npm'
28+
29+
- name: Install JavaScript dependencies
30+
run: npm ci

0 commit comments

Comments
 (0)