-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 2c7cf67
Showing
24 changed files
with
598 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,31 @@ | ||
version: "2" | ||
checks: | ||
argument-count: | ||
config: | ||
threshold: 4 | ||
complex-logic: | ||
config: | ||
threshold: 4 | ||
file-lines: | ||
config: | ||
threshold: 500 | ||
method-complexity: | ||
config: | ||
threshold: 5 | ||
method-count: | ||
config: | ||
threshold: 30 | ||
method-lines: | ||
config: | ||
threshold: 100 | ||
nested-control-flow: | ||
config: | ||
threshold: 4 | ||
return-statements: | ||
config: | ||
threshold: 4 | ||
identical-code: | ||
config: | ||
threshold: 80 | ||
similar-code: | ||
enabled: false |
This file contains 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,10 @@ | ||
// Workaround for https://github.com/eslint/eslint/issues/3458 | ||
require('@rushstack/eslint-patch/modern-module-resolution'); | ||
|
||
module.exports = { | ||
extends: ['plugin:@croct/typescript'], | ||
plugins: ['@croct'], | ||
parserOptions: { | ||
project: ['**/tsconfig.json'], | ||
}, | ||
}; |
Validating CODEOWNERS rules …
This file contains 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,5 @@ | ||
# Default owners | ||
* @croct-tech/js | ||
|
||
# GitHub configurations | ||
/.github/ @croct-tech/infra |
This file contains 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,24 @@ | ||
--- | ||
name: "🐞 Bug report" | ||
about: "Create a report to help us improve" | ||
labels: bug | ||
--- | ||
|
||
## 🐞 Bug report | ||
Please describe the problem you are experiencing. | ||
|
||
### Steps to reproduce | ||
Please provide a minimal code snippet and the detailed steps for reproducing the issue. | ||
|
||
1. Step 1 | ||
2. Step 2 | ||
3. Step 3 | ||
|
||
### Expected behavior | ||
Please describe the behavior you are expecting. | ||
|
||
### Screenshots | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
### Additional context | ||
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions. |
This file contains 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 @@ | ||
blank_issues_enabled: false |
This file contains 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,20 @@ | ||
--- | ||
name: "✨ Feature request" | ||
about: "Suggest an idea for this project" | ||
labels: enhancement | ||
--- | ||
|
||
## ✨ Feature request | ||
Please provide a brief explanation of the feature. | ||
|
||
### Motivation | ||
Please share the motivation for the new feature, and what problem it is solving. | ||
|
||
### Example | ||
If the proposal involves a new or changed API, please include a basic code example. | ||
|
||
### Alternatives | ||
Please describe the alternative solutions or features you've considered. | ||
|
||
### Additional context | ||
Please provide any other context or screenshots about the feature request here. |
This file contains 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,18 @@ | ||
## Summary | ||
Please include a summary of the change and which issue is addressed. | ||
|
||
- Fixes #(issue 1) | ||
- Fixes #(issue 2) | ||
- Fixes #(issue 3) | ||
|
||
### Checklist | ||
|
||
- [ ] My code follows the style guidelines of this project | ||
- [ ] I have performed a self-review of my own code | ||
- [ ] I have commented my code, particularly in hard-to-understand areas | ||
- [ ] I have made corresponding changes to the documentation | ||
- [ ] My changes generate no new warnings | ||
- [ ] I have added tests that prove my fix is effective or that my feature works | ||
- [ ] New and existing unit tests pass locally with my changes | ||
- [ ] Any dependent changes have been merged and published in downstream modules | ||
- [ ] I have checked my code and corrected any misspellings |
This file contains 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,34 @@ | ||
name-template: '$NEXT_PATCH_VERSION' | ||
tag-template: '$NEXT_PATCH_VERSION' | ||
prerelease: true | ||
categories: | ||
- title: '🚀 Features' | ||
labels: | ||
- feature | ||
- title: '🔧 Enhancements' | ||
labels: | ||
- enhancement | ||
- title: '🐞 Bug Fixes' | ||
labels: | ||
- bug | ||
- title: '🚧 Maintenance' | ||
labels: | ||
- maintenance | ||
change-template: '- $TITLE (#$NUMBER), thanks [$AUTHOR](https://github.com/$AUTHOR)!' | ||
sort-by: merged_at | ||
sort-direction: descending | ||
branches: | ||
- master | ||
exclude-labels: | ||
- wontfix | ||
- duplicate | ||
- invalid | ||
- question | ||
no-changes-template: 'This release contains minor changes and bugfixes.' | ||
template: |- | ||
## What's Changed | ||
$CHANGES | ||
🎉 **Thanks to all contributors helping with this release:** | ||
$CONTRIBUTORS |
This file contains 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,108 @@ | ||
name: Validations | ||
|
||
on: | ||
push: | ||
tags-ignore: | ||
- '**' | ||
branches: | ||
- master | ||
pull_request: | ||
types: | ||
- synchronize | ||
- opened | ||
|
||
jobs: | ||
security-checks: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Cache dependencies | ||
id: cache-dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: node_modules | ||
key: node_modules-${{ hashFiles('**/package-lock.json') }} | ||
|
||
- name: Install dependencies | ||
if: steps.cache-dependencies.outputs.cache-hit != 'true' | ||
run: npm ci | ||
|
||
- name: Check dependency vulnerabilities | ||
run: |- | ||
npm i -g npm-audit-resolver@3.0.0-7 | ||
npx check-audit --omit dev | ||
validate: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Cache dependencies | ||
id: cache-dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: node_modules | ||
key: node_modules-${{ hashFiles('**/package-lock.json') }} | ||
|
||
- name: Install dependencies | ||
if: steps.cache-dependencies.outputs.cache-hit != 'true' | ||
run: npm ci | ||
|
||
- name: Check compilation errors | ||
run: npm run validate | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Cache dependencies | ||
id: cache-dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: node_modules | ||
key: node_modules-${{ hashFiles('**/package-lock.json') }} | ||
|
||
- name: Install dependencies | ||
if: steps.cache-dependencies.outputs.cache-hit != 'true' | ||
run: npm ci | ||
|
||
- name: Check coding standard violations | ||
run: npm run lint | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Cache dependencies | ||
id: cache-dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: node_modules | ||
key: node_modules-${{ hashFiles('**/package-lock.json') }} | ||
|
||
- name: Install dependencies | ||
if: steps.cache-dependencies.outputs.cache-hit != 'true' | ||
run: npm ci | ||
|
||
- uses: paambaati/codeclimate-action@v5 | ||
env: | ||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | ||
with: | ||
coverageCommand: npm test | ||
coverageLocations: | ||
./coverage/lcov.info:lcov |
This file contains 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,19 @@ | ||
name: Label requirements | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
- labeled | ||
- unlabeled | ||
|
||
jobs: | ||
check-labels: | ||
name: Check labels | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: docker://agilepathway/pull-request-label-checker:latest | ||
with: | ||
any_of: maintenance,feature,bug,enhancement | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} |
This file contains 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,56 @@ | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
registry-url: 'https://npm.pkg.github.com' | ||
|
||
- name: Cache dependencies | ||
id: cache-dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: node_modules | ||
key: node_modules-${{ hashFiles('**/package-lock.json') }} | ||
|
||
- name: Install dependencies | ||
if: steps.cache-dependencies.outputs.cache-hit != 'true' | ||
run: |- | ||
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GH_PACKAGES_TOKEN }}" >> ~/.npmrc | ||
npm ci | ||
rm -rf ~/.npmrc | ||
- name: Build package | ||
run: |- | ||
npm run build | ||
- name: Prepare release | ||
run: |- | ||
cp package.json LICENSE README.md build/ | ||
cd build | ||
sed -i -e "s~\"version\": \"0.0.0-dev\"~\"version\": \"${GITHUB_REF##*/}\"~" package.json | ||
- name: Publish pre-release to NPM | ||
if: ${{ github.event.release.prerelease }} | ||
run: |- | ||
cd build | ||
npm publish --tag next | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Publish release to NPM | ||
if: ${{ !github.event.release.prerelease }} | ||
run: |- | ||
cd build | ||
npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains 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,17 @@ | ||
name: Release Drafter | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
tags-ignore: | ||
- '**' | ||
|
||
jobs: | ||
release-draft: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Update release draft | ||
uses: release-drafter/release-drafter@v6 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains 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,30 @@ | ||
name: Guidelines | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
jobs: | ||
send-guidelines: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: wow-actions/auto-comment@v1 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
pullRequestOpened: | | ||
👋 @{{ author }} | ||
**Thanks for your contribution!** | ||
The approval and merge process is almost fully automated 🧙 | ||
Here's how it works: | ||
1. You open a new pull request | ||
2. Automated tests check the code | ||
3. Maintainers review the code | ||
4. Once approved, the PR is ready to merge. | ||
> 👉 **Omit the extended description** | ||
> Please remove the commit body before merging the pull request. | ||
> Instead, include the pull request number in the title to provide the full context | ||
> about the change. | ||
☝️ Lastly, the title for the commit will come from the pull request title. So please provide a descriptive title that summarizes the changes in **50 characters or less using the imperative mood.** | ||
Happy coding! 🎉 |
Oops, something went wrong.