@theholocron/cli 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.alexignore +3 -0
- package/.editorconfig +24 -0
- package/.editorconfig-checker.json +20 -0
- package/.env +3 -0
- package/.gitattributes +12 -0
- package/.github/CODEOWNERS +1 -0
- package/.github/dependabot.yml +6 -0
- package/.github/labeler.yml +21 -0
- package/.github/workflows/bookkeeping-pr.yml +32 -0
- package/.github/workflows/greetings.yml +32 -0
- package/.github/workflows/lint.yml +96 -0
- package/.github/workflows/publish.yml +71 -0
- package/.github/workflows/review.yml +72 -0
- package/.github/workflows/stale.yml +25 -0
- package/.husky/commit-msg +1 -0
- package/.husky/pre-commit +13 -0
- package/.husky/prepare-commit-msg +18 -0
- package/LICENSE +674 -0
- package/README.md +17 -0
- package/commitlint.config.js +9 -0
- package/eslint.config.js +9 -0
- package/media/README.md +11 -0
- package/media/error.mp3 +0 -0
- package/media/success.mp3 +0 -0
- package/media/warning.mp3 +0 -0
- package/package.json +71 -0
- package/prettier.config.js +11 -0
- package/src/cli.ts +65 -0
- package/src/commands/README.md +13 -0
- package/src/commands/bootstrap.ts +102 -0
- package/src/commands/conf/README.md +45 -0
- package/src/commands/conf/add.ts +49 -0
- package/src/commands/conf/edit.ts +12 -0
- package/src/commands/conf/view.ts +40 -0
- package/src/commands/conf.ts +10 -0
- package/src/commands/log.ts +91 -0
- package/src/const.ts +19 -0
- package/src/tasks/README.md +33 -0
- package/src/tasks/find/README.md +49 -0
- package/src/tasks/find/find-project.example.ts +23 -0
- package/src/tasks/find/find-project.ts +76 -0
- package/src/tasks/find/index.ts +1 -0
- package/src/tasks/index.ts +2 -0
- package/src/tasks/replace/README.md +61 -0
- package/src/tasks/replace/index.ts +1 -0
- package/src/tasks/replace/replace.example.ts +31 -0
- package/src/tasks/replace/replace.ts +95 -0
- package/src/ui/README.md +8 -0
- package/src/ui/index.ts +2 -0
- package/src/ui/open/README.md +58 -0
- package/src/ui/open/index.ts +7 -0
- package/src/ui/open/open-browser.ts +25 -0
- package/src/ui/open/open-editor.example.ts +14 -0
- package/src/ui/open/open-editor.ts +30 -0
- package/src/ui/prompts/README.md +36 -0
- package/src/ui/prompts/autocomplete.prompt.ts +18 -0
- package/src/ui/prompts/confirm.prompt.ts +21 -0
- package/src/ui/prompts/index.ts +17 -0
- package/src/ui/prompts/input.prompt.ts +15 -0
- package/src/ui/prompts/search.prompt.ts +33 -0
- package/src/ui/prompts/select.prompt.ts +17 -0
- package/src/ui/prompts/types.ts +8 -0
- package/src/ui/prompts/utils.ts +11 -0
- package/src/utils/$/README.md +87 -0
- package/src/utils/$/command.test.ts +48 -0
- package/src/utils/$/command.ts +21 -0
- package/src/utils/$/directory.ts +108 -0
- package/src/utils/$/file.ts +98 -0
- package/src/utils/$/index.example.ts +37 -0
- package/src/utils/$/index.ts +22 -0
- package/src/utils/$/path.ts +13 -0
- package/src/utils/$/remove.ts +47 -0
- package/src/utils/$/spawn.ts +26 -0
- package/src/utils/$/utils.ts +21 -0
- package/src/utils/README.md +15 -0
- package/src/utils/config/README.md +41 -0
- package/src/utils/config/config.ts +26 -0
- package/src/utils/config/index.ts +1 -0
- package/src/utils/config/preferences.conf.ts +45 -0
- package/src/utils/env/README.md +52 -0
- package/src/utils/env/env.example.ts +21 -0
- package/src/utils/env/env.ts +57 -0
- package/src/utils/env/index.ts +1 -0
- package/src/utils/index.ts +5 -0
- package/src/utils/log/README.md +117 -0
- package/src/utils/log/index.ts +2 -0
- package/src/utils/log/log.example.ts +13 -0
- package/src/utils/log/log.ts +58 -0
- package/src/utils/log/logger.ts +28 -0
- package/src/utils/log/sound.ts +35 -0
- package/src/utils/node/README.md +23 -0
- package/src/utils/node/index.ts +5 -0
- package/src/utils/node/package.ts +12 -0
- package/tsconfig.json +15 -0
- package/yamllint.config.yml +20 -0
package/.alexignore
ADDED
package/.editorconfig
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
root = true
|
|
2
|
+
|
|
3
|
+
[*]
|
|
4
|
+
end_of_line = lf
|
|
5
|
+
charset = utf-8
|
|
6
|
+
trim_trailing_whitespace = true
|
|
7
|
+
insert_final_newline = true
|
|
8
|
+
indent_style = tab
|
|
9
|
+
indent_size = 4
|
|
10
|
+
|
|
11
|
+
[.gitattributes]
|
|
12
|
+
indent_style = space
|
|
13
|
+
indent_size = 2
|
|
14
|
+
|
|
15
|
+
[*.{json,yml}]
|
|
16
|
+
indent_style = space
|
|
17
|
+
indent_size = 2
|
|
18
|
+
|
|
19
|
+
[*.md]
|
|
20
|
+
trim_trailing_whitespace = false
|
|
21
|
+
|
|
22
|
+
[.*{rc,ignore}]
|
|
23
|
+
indent_style = space
|
|
24
|
+
indent_size = 2
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Version": "v3.0.3",
|
|
3
|
+
"Verbose": false,
|
|
4
|
+
"Format": "",
|
|
5
|
+
"Debug": false,
|
|
6
|
+
"IgnoreDefaults": false,
|
|
7
|
+
"SpacesAftertabs": false,
|
|
8
|
+
"NoColor": false,
|
|
9
|
+
"Exclude": ["^LICENSE$", "^public/.*"],
|
|
10
|
+
"AllowedContentTypes": [],
|
|
11
|
+
"PassedFiles": [],
|
|
12
|
+
"Disable": {
|
|
13
|
+
"EndOfLine": false,
|
|
14
|
+
"Indentation": false,
|
|
15
|
+
"InsertFinalNewline": false,
|
|
16
|
+
"TrimTrailingWhitespace": false,
|
|
17
|
+
"IndentSize": false,
|
|
18
|
+
"MaxLineLength": false
|
|
19
|
+
}
|
|
20
|
+
}
|
package/.env
ADDED
package/.gitattributes
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
* @theholocron/gatekeepers
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Add "documentation" label to any changes within "docs" folder or any subfolders or .md files within the entire repository
|
|
2
|
+
documentation:
|
|
3
|
+
- any:
|
|
4
|
+
- changed-files:
|
|
5
|
+
- any-glob-to-any-file:
|
|
6
|
+
- docs/**
|
|
7
|
+
- "**/*.md"
|
|
8
|
+
|
|
9
|
+
# Add "bug" label to any PR where the head branch name starts with `fix` with file changes to src directory
|
|
10
|
+
bug:
|
|
11
|
+
- all:
|
|
12
|
+
- changed-files:
|
|
13
|
+
- any-glob-to-any-file: src/**
|
|
14
|
+
- head-branch: "^fix-"
|
|
15
|
+
|
|
16
|
+
# Add "enhancement" label to any PR where the head branch name starts with `feat` with file changes to src directory
|
|
17
|
+
enhancement:
|
|
18
|
+
- all:
|
|
19
|
+
- changed-files:
|
|
20
|
+
- any-glob-to-any-file: src/**
|
|
21
|
+
- head-branch: "^feat-"
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: PR Bookkeeping
|
|
2
|
+
|
|
3
|
+
# @TODO: add in more things like:
|
|
4
|
+
# - [ ] auto-assigning,
|
|
5
|
+
# - [ ] project assignments,
|
|
6
|
+
# - [ ] milestone assignments
|
|
7
|
+
# - [ ] cleans up language
|
|
8
|
+
# - [ ] checks that template is filled out
|
|
9
|
+
|
|
10
|
+
on: # yamllint disable-line rule:truthy
|
|
11
|
+
pull_request:
|
|
12
|
+
types:
|
|
13
|
+
- opened
|
|
14
|
+
- edited
|
|
15
|
+
|
|
16
|
+
permissions:
|
|
17
|
+
contents: read
|
|
18
|
+
pull-requests: write
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
label-pr:
|
|
22
|
+
name: Add Labels to PRs
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
steps:
|
|
25
|
+
- uses: github/issue-labeler@v3.4
|
|
26
|
+
with:
|
|
27
|
+
include-title: 1
|
|
28
|
+
include-body: 0
|
|
29
|
+
sync-labels: 1
|
|
30
|
+
configuration-path: .github/labeler.yml
|
|
31
|
+
enable-versioned-regex: 0
|
|
32
|
+
repo-token: ${{ github.token }}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: Greetings
|
|
2
|
+
|
|
3
|
+
on: # yamllint disable-line rule:truthy
|
|
4
|
+
- pull_request
|
|
5
|
+
- issues
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
greeting:
|
|
9
|
+
name: Greet new interactions
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/first-interaction@v1
|
|
13
|
+
with:
|
|
14
|
+
issue-message: >
|
|
15
|
+
Hey @${{ github.event.issue.user.login }}!
|
|
16
|
+
We really appreciate you taking the time to report an issue. The
|
|
17
|
+
collaborators on this project attempt to help as many people as
|
|
18
|
+
possible, but we are a limited number of volunteers, so it is
|
|
19
|
+
possible that this will not be addressed as swiftly.
|
|
20
|
+
|
|
21
|
+
Your patience is much appreciated and we will get back to you as
|
|
22
|
+
quickly as possible.
|
|
23
|
+
pr-message: >
|
|
24
|
+
Hey @${{ github.event.issue.user.login }}!
|
|
25
|
+
We really appreciate you taking the time to help out with this PR.
|
|
26
|
+
The collaborators on this project attempt to help as many people as
|
|
27
|
+
possible, but we are a limited number of volunteers, so it is
|
|
28
|
+
possible that this will not be addressed as swiftly.
|
|
29
|
+
|
|
30
|
+
Your patience is much appreciated and we will get back to you as
|
|
31
|
+
quickly as possible.
|
|
32
|
+
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
name: Lint
|
|
2
|
+
|
|
3
|
+
on: # yamllint disable-line rule:truthy
|
|
4
|
+
- push
|
|
5
|
+
- pull_request
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
super-lint:
|
|
12
|
+
name: "Lint entire codebase"
|
|
13
|
+
permissions:
|
|
14
|
+
contents: write # write linting fixes
|
|
15
|
+
statuses: write # write Super-linter status checks
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
name: Checkout repository
|
|
20
|
+
with:
|
|
21
|
+
fetch-depth: 0
|
|
22
|
+
token: ${{ secrets.GH_TOKEN }}
|
|
23
|
+
|
|
24
|
+
- uses: actions/setup-node@v4
|
|
25
|
+
name: Setup Node.js @v20
|
|
26
|
+
with:
|
|
27
|
+
cache: npm
|
|
28
|
+
node-version: 20.x
|
|
29
|
+
|
|
30
|
+
- run: npm ci
|
|
31
|
+
name: Install dependencies
|
|
32
|
+
|
|
33
|
+
- uses: super-linter/super-linter/slim@v7.1.0
|
|
34
|
+
name: Run Super Linter
|
|
35
|
+
env:
|
|
36
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
37
|
+
ANNOTATE_ONLY: true # Allow annotations in the PR
|
|
38
|
+
DISABLE_COMMENTS: false # Enable comments in the PR
|
|
39
|
+
IGNORE_GITIGNORED_FILES: true
|
|
40
|
+
LINTER_RULES_PATH: /
|
|
41
|
+
# CSS_FILE_NAME: "stylelint.config.js"
|
|
42
|
+
EDITORCONFIG_FILE_NAME: ".editorconfig-checker.json"
|
|
43
|
+
# FIX_CSS_PRETTIER: true
|
|
44
|
+
FIX_ENV: true
|
|
45
|
+
FIX_GRAPHQL_PRETTIER: true
|
|
46
|
+
FIX_HTML_PRETTIER: true
|
|
47
|
+
FIX_JAVASCRIPT_PRETTIER: true
|
|
48
|
+
# FIX_JSON_PRETTIER: true => turning this off til i figure out why its not respecting config
|
|
49
|
+
FIX_JSX_PRETTIER: true
|
|
50
|
+
# FIX_MARKDOWN_PRETTIER: true
|
|
51
|
+
FIX_TSX: true
|
|
52
|
+
FIX_TYPESCRIPT_PRETTIER: true
|
|
53
|
+
# FIX_YAML_PRETTIER: true => turning this off til i figure out why its not respecting config
|
|
54
|
+
# GITHUB_ACTIONS_CONFIG_FILE: "actionlint.yml" => basically unneeded
|
|
55
|
+
# GITLEAKS_CONFIG: ".gitleaks.toml" # Path to your Gitleaks config if you have one
|
|
56
|
+
JAVASCRIPT_ES_CONFIG_FILE: "eslint.config.js"
|
|
57
|
+
# MARKDOWN_CONFIG_FILE: ".markdown-lint.yml"
|
|
58
|
+
# NATURAL_LANGUAGE_CONFIG_FILE: "textlint.config.js"
|
|
59
|
+
PRETTIER_CONFIG: "prettier.config.js"
|
|
60
|
+
TYPESCRIPT_ES_CONFIG_FILE: "eslint.config.js"
|
|
61
|
+
TYPESCRIPT_STANDARD_TSCONFIG_FILE: "tsconfig.json"
|
|
62
|
+
# VALIDATE_CSS_PRETTIER: true
|
|
63
|
+
VALIDATE_DOCKERFILE: true
|
|
64
|
+
VALIDATE_EDITORCONFIG: true
|
|
65
|
+
VALIDATE_ENV: true
|
|
66
|
+
VALIDATE_GIT_COMMITLINT: true
|
|
67
|
+
VALIDATE_GIT_MERGE_CONFLICT_MARKERS: true
|
|
68
|
+
VALIDATE_GITHUB_ACTIONS: true
|
|
69
|
+
VALIDATE_GITLEAKS: true
|
|
70
|
+
VALIDATE_GRAPHQL_PRETTIER: true
|
|
71
|
+
VALIDATE_HTML_PRETTIER: true
|
|
72
|
+
VALIDATE_JAVASCRIPT_PRETTIER: true
|
|
73
|
+
VALIDATE_JSON_PRETTIER: true
|
|
74
|
+
VALIDATE_JSX_PRETTIER: true
|
|
75
|
+
# VALIDATE_MARKDOWN_PRETTIER: true => disabling because its annoying and doesn't respect anything
|
|
76
|
+
# VALIDATE_NATURAL_LANGUAGE: true
|
|
77
|
+
VALIDATE_TSX: true
|
|
78
|
+
VALIDATE_TYPESCRIPT_PRETTIER: true
|
|
79
|
+
VALIDATE_YAML: true # turning on for now while prettier is broken
|
|
80
|
+
# VALIDATE_YAML_PRETTIER: true => turning it off because its writing 4 spaces instead of 2
|
|
81
|
+
YAML_CONFIG_FILE: "yamllint.config.yml"
|
|
82
|
+
|
|
83
|
+
- uses: stefanzweifel/git-auto-commit-action@v5
|
|
84
|
+
name: Commit and push linting fixes
|
|
85
|
+
# Run only on:
|
|
86
|
+
# - Pull requests
|
|
87
|
+
# - Not on the default branch
|
|
88
|
+
if: >
|
|
89
|
+
github.event_name == 'pull_request' &&
|
|
90
|
+
github.ref_name != github.event.repository.default_branch
|
|
91
|
+
with:
|
|
92
|
+
branch: ${{ github.event.pull_request.head.ref || github.head_ref || github.ref }}
|
|
93
|
+
commit_message: "chore: fix linting issues"
|
|
94
|
+
commit_options: "--no-verify --signoff"
|
|
95
|
+
commit_user_name: super-linter
|
|
96
|
+
commit_user_email: super-linter@super-linter.dev
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
name: Publish
|
|
2
|
+
|
|
3
|
+
on: # yamllint disable-line rule:truthy
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
packages: write
|
|
11
|
+
pull-requests: write
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
release:
|
|
15
|
+
name: Version using Semantic Versioning
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- uses: googleapis/release-please-action@v4
|
|
19
|
+
id: release
|
|
20
|
+
with:
|
|
21
|
+
release-type: node
|
|
22
|
+
# The short ref name of the branch or tag that triggered
|
|
23
|
+
# the workflow run. For example, `main` or `1.x`
|
|
24
|
+
target-branch: ${{ github.ref_name }}
|
|
25
|
+
|
|
26
|
+
publish-npm:
|
|
27
|
+
name: Publish to NPM
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
needs: release
|
|
30
|
+
steps:
|
|
31
|
+
- uses: actions/checkout@v4
|
|
32
|
+
name: Checkout repository
|
|
33
|
+
|
|
34
|
+
- uses: actions/setup-node@v4
|
|
35
|
+
name: Setup Node.js @v20
|
|
36
|
+
with:
|
|
37
|
+
cache: npm
|
|
38
|
+
node-version: 20.x
|
|
39
|
+
registry-url: 'https://registry.npmjs.org'
|
|
40
|
+
|
|
41
|
+
- run: npm ci
|
|
42
|
+
name: Install dependencies
|
|
43
|
+
|
|
44
|
+
- run: npm publish
|
|
45
|
+
name: Publish to GitHub
|
|
46
|
+
env:
|
|
47
|
+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
|
48
|
+
|
|
49
|
+
publish-gh:
|
|
50
|
+
name: Publish to GitHub
|
|
51
|
+
runs-on: ubuntu-latest
|
|
52
|
+
needs: release
|
|
53
|
+
steps:
|
|
54
|
+
- uses: actions/checkout@v4
|
|
55
|
+
name: Checkout repository
|
|
56
|
+
|
|
57
|
+
- uses: actions/setup-node@v4
|
|
58
|
+
name: Setup Node.js @v20
|
|
59
|
+
with:
|
|
60
|
+
cache: npm
|
|
61
|
+
node-version: 20.x
|
|
62
|
+
registry-url: 'https://npm.pkg.github.com'
|
|
63
|
+
scope: '@theholocron'
|
|
64
|
+
|
|
65
|
+
- run: npm ci
|
|
66
|
+
name: Install dependencies
|
|
67
|
+
|
|
68
|
+
- run: npm publish --access public
|
|
69
|
+
name: Publish to GitHub Packages
|
|
70
|
+
env:
|
|
71
|
+
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
name: Review
|
|
2
|
+
|
|
3
|
+
on: # yamllint disable-line rule:truthy
|
|
4
|
+
- push
|
|
5
|
+
- pull_request
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
reviewdog:
|
|
9
|
+
name: Review PRs
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
name: Checkout repository
|
|
14
|
+
|
|
15
|
+
- uses: actions/setup-node@v4
|
|
16
|
+
name: Setup Node.js @v20
|
|
17
|
+
with:
|
|
18
|
+
cache: npm
|
|
19
|
+
node-version: 20.x
|
|
20
|
+
|
|
21
|
+
- run: npm ci
|
|
22
|
+
name: Install dependencies
|
|
23
|
+
|
|
24
|
+
- uses: reviewdog/action-setup@v1
|
|
25
|
+
name: Install & setup ReviewDog
|
|
26
|
+
with:
|
|
27
|
+
reviewdog_version: latest # Optional. [latest,nightly,v.X.Y.Z]
|
|
28
|
+
|
|
29
|
+
- uses: reviewdog/action-gitleaks@v1
|
|
30
|
+
name: Detect secrets using Gitleaks
|
|
31
|
+
with:
|
|
32
|
+
reporter: github-pr-check
|
|
33
|
+
|
|
34
|
+
- uses: reviewdog/action-alex@v1
|
|
35
|
+
name: Check language using Alex
|
|
36
|
+
with:
|
|
37
|
+
reporter: github-pr-check # [github-pr-check,github-check,github-pr-review]
|
|
38
|
+
# GitHub Status Check won't become failure with warning.
|
|
39
|
+
# level: warning # [info,warning, error]
|
|
40
|
+
|
|
41
|
+
- uses: EPMatt/reviewdog-action-tsc@v1
|
|
42
|
+
name: Check types using TypeScript
|
|
43
|
+
with:
|
|
44
|
+
reporter: github-pr-check
|
|
45
|
+
|
|
46
|
+
# - uses: reviewdog/action-stylelint@v1
|
|
47
|
+
# name: Check CSS using StyleLint
|
|
48
|
+
# with:
|
|
49
|
+
# reporter: github-pr-check
|
|
50
|
+
# stylelint_input: '**/*.css'
|
|
51
|
+
|
|
52
|
+
# need to setup textlint in the repo for this
|
|
53
|
+
# - uses: tsuyoshicho/action-textlint@v3
|
|
54
|
+
# name: Check text using TextLint
|
|
55
|
+
# with:
|
|
56
|
+
# reporter: github-pr-check
|
|
57
|
+
|
|
58
|
+
- uses: reviewdog/action-actionlint@v1
|
|
59
|
+
name: Check GitHub Actions using ActionLint
|
|
60
|
+
with:
|
|
61
|
+
reporter: github-pr-check
|
|
62
|
+
|
|
63
|
+
- uses: dotenv-linter/action-dotenv-linter@v2
|
|
64
|
+
name: Check environment variables using dotenv
|
|
65
|
+
with:
|
|
66
|
+
reporter: github-code-suggestions
|
|
67
|
+
|
|
68
|
+
- uses: reviewdog/action-yamllint@v1
|
|
69
|
+
name: Check YAML using YamlLint
|
|
70
|
+
with:
|
|
71
|
+
reporter: github-pr-check
|
|
72
|
+
yamllint_flags: "-c ${{ github.workspace }}/yamllint.config.yml ${{ github.workspace }}"
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
name: Stale
|
|
2
|
+
|
|
3
|
+
on: # yamllint disable-line rule:truthy
|
|
4
|
+
schedule:
|
|
5
|
+
- cron: "30 1 * * *"
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
stale:
|
|
9
|
+
name: Mark stale issues and pull requests
|
|
10
|
+
permissions:
|
|
11
|
+
contents: write # only for delete-branch option
|
|
12
|
+
issues: write
|
|
13
|
+
pull-requests: write
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/stale@v9
|
|
17
|
+
with:
|
|
18
|
+
close-issue-message: "This issue was closed because it has been stalled for 5 days with no activity."
|
|
19
|
+
days-before-close: 5
|
|
20
|
+
days-before-stale: 30
|
|
21
|
+
exempt-all-pr-milestones: true
|
|
22
|
+
stale-issue-label: "wontfix"
|
|
23
|
+
stale-issue-message: "This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days."
|
|
24
|
+
stale-pr-label: "wontfix"
|
|
25
|
+
stale-pr-message: "This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days."
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
npx --no -- commitlint --edit $1
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
|
|
3
|
+
# Run GitLeaks to detect secrets
|
|
4
|
+
gitleaks git --no-banner
|
|
5
|
+
|
|
6
|
+
# Exit with non-zero if secrets are detected by GitLeaks
|
|
7
|
+
if [ $? -ne 0 ]; then
|
|
8
|
+
echo "Secrets detected by GitLeaks, aborting commit!"
|
|
9
|
+
exit 1
|
|
10
|
+
fi
|
|
11
|
+
|
|
12
|
+
# Run lint-staged with a custom config
|
|
13
|
+
npx lint-staged --config @theholocron/lint-staged-config
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
|
|
3
|
+
NAME=$(git config user.name)
|
|
4
|
+
EMAIL=$(git config user.email)
|
|
5
|
+
|
|
6
|
+
if [ -z "$NAME" ]; then
|
|
7
|
+
echo "empty git config user.name"
|
|
8
|
+
exit 1
|
|
9
|
+
fi
|
|
10
|
+
|
|
11
|
+
if [ -z "$EMAIL" ]; then
|
|
12
|
+
echo "empty git config user.email"
|
|
13
|
+
exit 1
|
|
14
|
+
fi
|
|
15
|
+
|
|
16
|
+
git interpret-trailers --if-exists doNothing --trailer \
|
|
17
|
+
"Signed-off-by: $NAME <$EMAIL>" \
|
|
18
|
+
--in-place "$1"
|