Skip to content

Commit 04913f5

Browse files
Initial commit
0 parents  commit 04913f5

51 files changed

Lines changed: 41134 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.checkov.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# See: https://www.checkov.io/1.Welcome/Quick%20Start.html
2+
3+
compact: true
4+
quiet: true
5+
skip-path:
6+
- coverage
7+
- node_modules

.devcontainer/devcontainer.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"name": "GitHub Actions (JavaScript)",
3+
"image": "mcr.microsoft.com/devcontainers/javascript-node:20",
4+
"postCreateCommand": "npm install",
5+
"customizations": {
6+
"codespaces": {
7+
"openFiles": ["README.md"]
8+
},
9+
"vscode": {
10+
"extensions": [
11+
"bierner.markdown-preview-github-styles",
12+
"davidanson.vscode-markdownlint",
13+
"dbaeumer.vscode-eslint",
14+
"esbenp.prettier-vscode",
15+
"github.copilot",
16+
"github.copilot-chat",
17+
"github.vscode-github-actions",
18+
"github.vscode-pull-request-github",
19+
"me-dutour-mathieu.vscode-github-actions",
20+
"redhat.vscode-yaml",
21+
"rvest.vs-code-prettier-eslint",
22+
"yzhang.markdown-all-in-one"
23+
],
24+
"settings": {
25+
"editor.defaultFormatter": "esbenp.prettier-vscode",
26+
"editor.tabSize": 2,
27+
"editor.formatOnSave": true,
28+
"markdown.extension.list.indentationSize": "adaptive",
29+
"markdown.extension.italic.indicator": "_",
30+
"markdown.extension.orderedList.marker": "one"
31+
}
32+
}
33+
},
34+
"remoteEnv": {
35+
"GITHUB_TOKEN": "${localEnv:GITHUB_TOKEN}"
36+
},
37+
"features": {
38+
"ghcr.io/devcontainers/features/github-cli:1": {},
39+
"ghcr.io/devcontainers-community/npm-features/prettier:1": {}
40+
}
41+
}

.env.example

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Do not commit your actual .env file to Git! This may contain secrets or other
2+
# private information.
3+
4+
# Enable/disable step debug logging (default: `false`). For local debugging, it
5+
# may be useful to set it to `true`.
6+
ACTIONS_STEP_DEBUG=true
7+
8+
# GitHub Actions inputs should follow `INPUT_<name>` format (case-sensitive).
9+
# Hyphens should not be converted to underscores!
10+
INPUT_MILLISECONDS=2400
11+
12+
# GitHub Actions default environment variables. These are set for every run of a
13+
# workflow and can be used in your actions. Setting the value here will override
14+
# any value set by the local-action tool.
15+
# https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables
16+
17+
# CI="true"
18+
# GITHUB_ACTION=""
19+
# GITHUB_ACTION_PATH=""
20+
# GITHUB_ACTION_REPOSITORY=""
21+
# GITHUB_ACTIONS=""
22+
# GITHUB_ACTOR=""
23+
# GITHUB_ACTOR_ID=""
24+
# GITHUB_API_URL=""
25+
# GITHUB_BASE_REF=""
26+
# GITHUB_ENV=""
27+
# GITHUB_EVENT_NAME=""
28+
# GITHUB_EVENT_PATH=""
29+
# GITHUB_GRAPHQL_URL=""
30+
# GITHUB_HEAD_REF=""
31+
# GITHUB_JOB=""
32+
# GITHUB_OUTPUT=""
33+
# GITHUB_PATH=""
34+
# GITHUB_REF=""
35+
# GITHUB_REF_NAME=""
36+
# GITHUB_REF_PROTECTED=""
37+
# GITHUB_REF_TYPE=""
38+
# GITHUB_REPOSITORY=""
39+
# GITHUB_REPOSITORY_ID=""
40+
# GITHUB_REPOSITORY_OWNER=""
41+
# GITHUB_REPOSITORY_OWNER_ID=""
42+
# GITHUB_RETENTION_DAYS=""
43+
# GITHUB_RUN_ATTEMPT=""
44+
# GITHUB_RUN_ID=""
45+
# GITHUB_RUN_NUMBER=""
46+
# GITHUB_SERVER_URL=""
47+
# GITHUB_SHA=""
48+
# GITHUB_STEP_SUMMARY=""
49+
# GITHUB_TRIGGERING_ACTOR=""
50+
# GITHUB_WORKFLOW=""
51+
# GITHUB_WORKFLOW_REF=""
52+
# GITHUB_WORKFLOW_SHA=""
53+
# GITHUB_WORKSPACE=""
54+
# RUNNER_ARCH=""
55+
# RUNNER_DEBUG=""
56+
# RUNNER_NAME=""
57+
# RUNNER_OS=""
58+
# RUNNER_TEMP=""
59+
# RUNNER_TOOL_CACHE=""

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
* text=auto eol=lf
2+
3+
dist/** -diff linguist-generated=true

.github/codeql/codeql-config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
name: JavaScript CodeQL Configuration
2+
3+
paths-ignore:
4+
- node_modules
5+
- dist

.github/copilot-instructions.md

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
# Copilot Instructions
2+
3+
This GitHub Action is written in JavaScript and transpiled to a single file.
4+
Both the JavaScript sources and the **generated** JavaScript code are contained
5+
in this repository. The JavaScript sources are contained in the `src` directory
6+
and the code invoked by GitHub Actions is contained in the `dist` directory. A
7+
GitHub Actions workflow checks that the JavaScript code in `dist` is up-to-date.
8+
Therefore, you should not review any changes to the contents of the `dist`
9+
folder and it is expected that the JavaScript code in `dist` closely mirrors the
10+
code it is generated from.
11+
12+
## Repository Structure
13+
14+
| Path | Description |
15+
| -------------------- | -------------------------------------------------------- |
16+
| `__fixtures__/` | Unit Test Fixtures |
17+
| `__tests__/` | Unit Tests |
18+
| `.devcontainer/` | Development Container Configuration |
19+
| `.github/` | GitHub Configuration |
20+
| `.licenses/` | License Information |
21+
| `.vscode/` | Visual Studio Code Configuration |
22+
| `badges/` | Badges for readme |
23+
| `dist/` | Generated JavaScript Code |
24+
| `src/` | JavaScript Source Code |
25+
| `.env.example` | Environment Variables Example for `@github/local-action` |
26+
| `.licensed.yml` | Licensed Configuration |
27+
| `.markdown-lint.yml` | Markdown Linter Configuration |
28+
| `.node-version` | Node.js Version Configuration |
29+
| `.prettierrc.yml` | Prettier Formatter Configuration |
30+
| `.yaml-lint.yml` | YAML Linter Configuration |
31+
| `action.yml` | GitHub Action Metadata |
32+
| `CODEOWNERS` | Code Owners File |
33+
| `eslint.config.mjs` | ESLint Configuration |
34+
| `jest.config.js` | Jest Configuration |
35+
| `LICENSE` | License File |
36+
| `package.json` | NPM Package Configuration |
37+
| `README.md` | Project Documentation |
38+
| `rollup.config.js` | Rollup Bundler Configuration |
39+
40+
## Environment Setup
41+
42+
Install dependencies by running:
43+
44+
```bash
45+
npm install
46+
```
47+
48+
## Testing
49+
50+
Ensure all unit tests pass by running:
51+
52+
```bash
53+
npm run test
54+
```
55+
56+
Unit tests should exist in the `__tests__` directory. They are powered by
57+
`jest`. Fixtures should be placed in the `__fixtures__` directory.
58+
59+
## Bundling
60+
61+
Any time files in the `src` directory are changed, you should run the following
62+
command to bundle the JavaScript code into the `dist` directory:
63+
64+
```bash
65+
npm run bundle
66+
```
67+
68+
## General Coding Guidelines
69+
70+
- Follow standard JavaScript coding conventions and best practices
71+
- Changes should maintain consistency with existing patterns and style
72+
- Document changes clearly and thoroughly, including updates to existing
73+
comments when appropriate
74+
- Do not include basic, unnecessary comments that simply restate what the code
75+
is doing (focus on explaining _why_, not _what_)
76+
- Use consistent error handling patterns throughout the codebase
77+
- Keep functions focused and manageable
78+
- Use descriptive variable and function names that clearly convey their purpose
79+
- Use JSDoc comments to document functions, classes, and complex logic
80+
- After doing any refactoring, ensure to run `npm run test` to ensure that all
81+
tests still pass and coverage requirements are met
82+
- When suggesting code changes, always opt for the most maintainable approach.
83+
Try your best to keep the code clean and follow "Don't Repeat Yourself" (DRY)
84+
principles
85+
- Avoid unnecessary complexity and always consider the long-term maintainability
86+
of the code
87+
- When writing unit tests, try to consider edge cases as well as the main path
88+
of success. This will help ensure that the code is robust and can handle
89+
unexpected inputs or situations
90+
- Use the `@actions/core` package for logging over `console` to ensure
91+
compatibility with GitHub Actions logging features
92+
93+
### Versioning
94+
95+
GitHub Actions are versioned using branch and tag names. Please ensure the
96+
version in the project's `package.json` is updated to reflect the changes made
97+
in the codebase. The version should follow
98+
[Semantic Versioning](https://semver.org/) principles.
99+
100+
## Pull Request Guidelines
101+
102+
When creating a pull request (PR), please ensure that:
103+
104+
- Keep changes focused and minimal (avoid large changes, or consider breaking
105+
them into separate, smaller PRs)
106+
- Formatting checks pass
107+
- Linting checks pass
108+
- Unit tests pass and coverage requirements are met
109+
- The action has been transpiled to JavaScript and the `dist` directory is
110+
up-to-date with the latest changes in the `src` directory
111+
- If necessary, the `README.md` file is updated to reflect any changes in
112+
functionality or usage
113+
114+
The body of the PR should include:
115+
116+
- A summary of the changes
117+
- A special note of any changes to dependencies
118+
- A link to any relevant issues or discussions
119+
- Any additional context that may be helpful for reviewers
120+
121+
## Code Review Guidelines
122+
123+
When performing a code review, please follow these guidelines:
124+
125+
- If there are changes that modify the functionality/usage of the action,
126+
validate that there are changes in the `README.md` file that document the new
127+
or modified functionality

.github/dependabot.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
groups:
8+
actions-minor:
9+
update-types:
10+
- minor
11+
- patch
12+
13+
- package-ecosystem: npm
14+
directory: /
15+
schedule:
16+
interval: weekly
17+
groups:
18+
npm-development:
19+
dependency-type: development
20+
update-types:
21+
- minor
22+
- patch
23+
npm-production:
24+
dependency-type: production
25+
update-types:
26+
- patch
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
mode: agent
3+
tools: ['changes', 'codebase', 'github']
4+
description: Generate release notes for updates to the repository.
5+
---
6+
7+
# Create Release Notes
8+
9+
You are an expert technical writer tasked with creating release notes for
10+
updates to this repository. Your specific task is to generate release notes that
11+
are clear, concise, and useful for developers and users of the project.
12+
13+
## Guidelines
14+
15+
Ensure you adhere to the following guidelines when creating release notes:
16+
17+
- Use a clear and consistent format for the release notes
18+
- Include a summary of the changes made in the release
19+
- Highlight any new features, improvements, or bugfixes
20+
- If applicable, include instructions for upgrading or migrating to the new
21+
version
22+
- Use technical language that is appropriate for the audience, but avoid jargon
23+
that may not be understood by all users
24+
- Ensure that the release notes are easy to read and navigate
25+
- Include relevant issue or PR numbers where applicable
26+
- Use proper Markdown formatting
27+
- Use code blocks for commands, configuration examples, or code changes
28+
- Use note and warning callouts for important information
29+
30+
## Versioning
31+
32+
GitHub Actions are versioned using branch and tag names. The version in the
33+
project's `package.json` should reflect the changes made in the codebase and
34+
follow [Semantic Versioning](https://semver.org/) principles. Depending on the
35+
nature of the changes, please make sure to adjust the release notes accordingly:
36+
37+
- For **major** changes, include a detailed description of the breaking changes
38+
and how users can adapt to them
39+
- For **minor** changes, highlight new features and improvements
40+
- For **patch** changes, focus on bugfixes and minor improvements

0 commit comments

Comments
 (0)