Skip to content

Commit 7cf8c22

Browse files
authored
ci: ci update of all workflows (#822)
1 parent 5ce427e commit 7cf8c22

26 files changed

+18186
-8645
lines changed

.github/CONTRIBUTING.md

+748
Large diffs are not rendered by default.

.github/TROUBLESHOOT.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# TROUBLESHOOT
2+
3+
## Development
4+
5+
### Limit of file watchers reached
6+
7+
Error: ENOSPC: System limit for number of file watchers reached
8+
[Stackoverflow answer](https://stackoverflow.com/questions/55763428/react-native-error-enospc-system-limit-for-number-of-file-watchers-reached)
9+
10+
```
11+
# insert the new value into the system config
12+
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
13+
14+
# check that the new value was applied
15+
cat /proc/sys/fs/inotify/max_user_watches
16+
17+
# config variable name (not runnable)
18+
fs.inotify.max_user_watches=524288
19+
```

.github/commit-convention.md

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
## Git Commit Message Convention
2+
3+
> This is adapted from [Angular's commit convention](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular).
4+
5+
#### TL;DR:
6+
7+
Messages must be matched by the following regex:
8+
9+
<!-- prettier-ignore -->
10+
```js
11+
/^(revert: )?(feat|fix|docs|dx|refactor|perf|test|workflow|build|ci|chore|types|wip|release|deps)(\(.+\))?: .{1,50}/
12+
```
13+
14+
#### Examples
15+
16+
Appears under "Features" header, `dev` subheader:
17+
18+
```
19+
feat(dev): add 'comments' option
20+
```
21+
22+
Appears under "Bug Fixes" header, `dev` subheader, with a link to issue #28:
23+
24+
```
25+
fix(dev): fix dev error
26+
27+
close #28
28+
```
29+
30+
Appears under "Performance Improvements" header, and under "Breaking Changes" with the breaking change explanation:
31+
32+
```
33+
perf(build): remove 'foo' option
34+
35+
BREAKING CHANGE: The 'foo' option has been removed.
36+
```
37+
38+
The following commit and commit `667ecc1` do not appear in the changelog if they are under the same release. If not, the revert commit appears under the "Reverts" header.
39+
40+
```
41+
revert: feat(compiler): add 'comments' option
42+
43+
This reverts commit 667ecc1654a317a13331b17617d973392f415f02.
44+
```
45+
46+
### Full Message Format
47+
48+
A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**:
49+
50+
```
51+
<type>(<scope>): <subject>
52+
<BLANK LINE>
53+
<body>
54+
<BLANK LINE>
55+
<footer>
56+
```
57+
58+
The **header** is mandatory and the **scope** of the header is optional.
59+
60+
### Revert
61+
62+
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit. In the body, it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
63+
64+
### Type
65+
66+
If the prefix is `feat`, `fix` or `perf`, it will appear in the changelog. However, if there is any [BREAKING CHANGE](#footer), the commit will always appear in the changelog.
67+
68+
Other prefixes are up to your discretion. Suggested prefixes are `docs`, `chore`, `style`, `refactor`, and `test` for non-changelog related tasks.
69+
70+
### Scope
71+
72+
The scope could be anything specifying the place of the commit change. For example `dev`, `build`, `workflow`, `cli` etc...
73+
74+
### Subject
75+
76+
The subject contains a succinct description of the change:
77+
78+
- use the imperative, present tense: "change" not "changed" nor "changes"
79+
- don't capitalize the first letter
80+
- no dot (.) at the end
81+
82+
### Body
83+
84+
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
85+
The body should include the motivation for the change and contrast this with previous behavior.
86+
87+
### Footer
88+
89+
The footer should contain any information about **Breaking Changes** and is also the place to
90+
reference GitHub issues that this commit **Closes**.
91+
92+
**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.

.github/file-filters.yml

+13-2
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,29 @@
33
frontend_lintable:
44
- "**/*.[tj]{s,sx}"
55
- "**/tsconfig*.json"
6+
- "**/package.json"
7+
- "pnpm-lock.yaml"
8+
9+
package_json_lintable:
10+
- "**/package.json"
11+
- "package.json"
612

713
markdown_lintable:
814
- "**/*.md"
915
- "**/*.mdx"
16+
- "**/package.json"
17+
- "pnpm-lock.yaml"
1018

1119
yaml_lintable:
1220
- "**/*.yml"
1321
- "**/*.yaml"
22+
- "pnpm-lock.yaml"
1423

1524
packages: &packages
1625
- "**/tsconfig*.json"
1726
- "pnpm-lock.yaml"
27+
- "package.json"
1828
- "packages/**"
19-
- ".github/workflows/test.yml"
20-
- ".github/workflows/lint.yml"
29+
30+
codecov:
31+
- "codecov.yml"
+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
.github/**
2+
plop/**
3+
.husky/**
4+
.nx/**
5+
.czrc
6+
.editorconfig
7+
.gitattributes
8+
.gitignore
9+
.lintstagedrc.cjs
10+
.lintstagedrc.cjs
11+
.npmignore
12+
.nxignore
13+
.prettierignore
14+
.prettierrc.cjs
15+
.secretlintignore
16+
.secretlintrc.cjs
17+
.textlintignore
18+
.textlintrc
19+
.yamllint.yaml
20+
audit-ci.jsonc
21+
codecov.yml
22+
commitlint.config.cjs
23+
nx.json
24+
plop.js
25+
pnpm-lock.yaml
26+
pnpm-workspace.yaml
27+
taze.config.js
28+
tsconfig.base.json
29+
tsconfig.eslint.json
30+
tsconfig.json

.github/workflows/allo-allo.yaml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: "AlloAllo"
2+
3+
on: # yamllint disable-line rule:truthy
4+
issues:
5+
types:
6+
- "opened"
7+
pull_request_target:
8+
branches:
9+
- "main"
10+
types:
11+
- "opened"
12+
- "closed"
13+
14+
jobs:
15+
allo-allo:
16+
uses: "anolilab/workflows/.github/workflows/allo-allo.yml@main"
17+
with:
18+
target-repo: "anolilab/javascript-style-guide"
19+
issue-welcome: >
20+
It looks like this is your first issue. Welcome! 👋
21+
One of the project maintainers will be with you as soon as possible. We
22+
appreciate your patience. To safeguard the health of the project, please
23+
take a moment to read our [code of conduct](https://github.com/anolilab/javascript-style-guide/blob/main/.github/CODE_OF_CONDUCT.md).
24+
pr-welcome: >
25+
It looks like this is your first pull request. 🎉
26+
Thank you for your contribution! One of the project maintainers will triage
27+
and assign the pull request for review. We appreciate your patience. To
28+
safeguard the health of the project, please take a moment to read our
29+
[code of conduct](https://github.com/anolilab/javascript-style-guide/blob/main/.github/CODE_OF_CONDUCT.md).
30+
pr-merged: >
31+
Congratulations on your first merged pull request! 🎉
32+
Thank you for your contribution!
33+
We appreciate your patience.
34+
We look forward to your next contribution.

.github/workflows/cache-clear.yml

+5-32
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,12 @@
1-
name: "cleanup caches by a branch"
1+
name: "Cleanup caches by a branch"
22

33
on: # yamllint disable-line rule:truthy
44
pull_request:
55
types:
66
- "closed"
77

88
jobs:
9-
cleanup:
10-
runs-on: "ubuntu-latest"
11-
steps:
12-
- name: "Harden Runner"
13-
uses: "step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142" # v2.7.0
14-
with:
15-
egress-policy: "audit"
16-
17-
- name: "Check out code"
18-
uses: "actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11" # v4.1.1
19-
20-
- name: "Cleanup"
21-
run: |
22-
gh extension install actions/gh-actions-cache
23-
24-
REPO=${{ github.repository }}
25-
BRANCH="refs/pull/${{ github.event.pull_request.number }}/merge"
26-
27-
echo "Fetching list of cache key"
28-
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 )
29-
30-
## Setting this to not fail the workflow while deleting cache keys.
31-
set +e
32-
echo "Deleting caches..."
33-
for cacheKey in $cacheKeysForPR
34-
do
35-
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
36-
done
37-
echo "Done"
38-
env:
39-
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
9+
cleanup-branch-cache:
10+
uses: "anolilab/workflows/.github/workflows/cleanup-branch-cache.yml@main"
11+
with:
12+
target-repo: "anolilab/javascript-style-guide"

.github/workflows/codeql.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,16 @@ jobs:
4343

4444
steps:
4545
- name: "Harden Runner"
46-
uses: "step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142" # v2.7.0
46+
uses: "step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6" # v2.8.1
4747
with:
4848
egress-policy: "audit"
4949

5050
- name: "Checkout repository"
51-
uses: "actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11" # v4.1.1
51+
uses: "actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332" # v4.1.7
5252

5353
# Initializes the CodeQL tools for scanning.
5454
- name: "Initialize CodeQL"
55-
uses: "github/codeql-action/init@928ff8c822d966a999092a6a35e32177899afb7c" # v2.24.6
55+
uses: "github/codeql-action/init@1b1aada464948af03b950897e5eb522f92603cc2" # v3.24.9
5656
with:
5757
languages: "${{ matrix.language }}"
5858
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -62,7 +62,7 @@ jobs:
6262
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
6363
# If this step fails, then you should remove it and run the build manually (see below)
6464
- name: "Autobuild"
65-
uses: "github/codeql-action/autobuild@928ff8c822d966a999092a6a35e32177899afb7c" # v2.24.6
65+
uses: "github/codeql-action/autobuild@1b1aada464948af03b950897e5eb522f92603cc2" # v3.24.9
6666

6767
# ℹ️ Command-line programs to run using the OS shell.
6868
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
@@ -75,6 +75,6 @@ jobs:
7575
# ./location_of_script_within_repo/buildscript.sh
7676

7777
- name: "Perform CodeQL Analysis"
78-
uses: "github/codeql-action/analyze@928ff8c822d966a999092a6a35e32177899afb7c" # v2.24.6
78+
uses: "github/codeql-action/analyze@1b1aada464948af03b950897e5eb522f92603cc2" # v3.24.9
7979
with:
8080
category: "/language:${{matrix.language}}"

.github/workflows/comment-issue.yml

+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: "Comment Issue"
2+
3+
on: # yamllint disable-line rule:truthy
4+
issues:
5+
types:
6+
- "labeled"
7+
8+
permissions:
9+
contents: "read"
10+
11+
jobs:
12+
add-comment-for-user-interest:
13+
if: "github.event.label.name == 's: waiting for user interest'"
14+
runs-on: "ubuntu-latest"
15+
permissions:
16+
issues: "write"
17+
steps:
18+
- name: "Harden Runner"
19+
uses: "step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6" # v2.8.1
20+
with:
21+
egress-policy: "audit"
22+
23+
- name: "Add Comment For User Interest"
24+
uses: "actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea" # v7.0.1
25+
with:
26+
script: |
27+
github.rest.issues.createComment({
28+
issue_number: context.issue.number,
29+
owner: context.repo.owner,
30+
repo: context.repo.repo,
31+
body: `**Thank you for your feature proposal.**
32+
33+
We marked it as "waiting for user interest" for now to gather some feedback from our community:
34+
35+
- If you would like to see this feature be implemented, please react to the description with an up-vote (:+1:).
36+
- If you have a suggestion or want to point out some special cases that need to be considered, please leave a comment, so we are aware about them.
37+
38+
We would also like to hear about other community members' use cases for the feature to give us a better understanding of their potential implicit or explicit requirements.
39+
40+
We will start the implementation based on:
41+
42+
- the number of votes (:+1:) and comments
43+
- the relevance for the ecosystem
44+
- availability of alternatives and workarounds
45+
- and the complexity of the requested feature
46+
47+
We do this because:
48+
49+
- There are plenty of frameworks/tools out there and we would like to ensure that every method can cover all or almost all of them.
50+
- Every feature we add to Visulima has "costs" associated to it:
51+
- initial costs: design, implementation, reviews, documentation
52+
- running costs: awareness of the feature itself, more complex module structure, increased bundle size, more work during refactors
53+
54+
---
55+
56+
[View more issues which are waiting for user interest](https://github.com/anolilab/javascript-style-guide/issues?q=is%3Aissue+is%3Aopen+label%3A%22s%3A+waiting+for+user+interest%22+)`,
57+
})
58+
59+
- name: "React to Issue"
60+
uses: "actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea" # v7.0.1
61+
with:
62+
script: |
63+
github.rest.reactions.createForIssue({
64+
issue_number: context.issue.number,
65+
owner: context.repo.owner,
66+
repo: context.repo.repo,
67+
content: "+1",
68+
});

.github/workflows/dependency-review.yml

+4-3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ name: "Dependency Review"
1111
on: # yamllint disable-line rule:truthy
1212
# eslint-disable-next-line yml/no-empty-mapping-value
1313
pull_request: # yamllint disable-line rule:empty-values
14+
merge_group: # yamllint disable-line rule:empty-values
1415

1516
permissions:
1617
contents: "read"
@@ -20,16 +21,16 @@ jobs:
2021
runs-on: "ubuntu-latest"
2122
steps:
2223
- name: "Harden Runner"
23-
uses: "step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142" # v2.7.0
24+
uses: "step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6" # v2.8.1
2425
with:
2526
egress-policy: "audit"
2627

2728
- name: "Git checkout"
28-
uses: "actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11" # v4.1.1
29+
uses: "actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332" # v4.1.7
2930
env:
3031
GIT_COMMITTER_NAME: "GitHub Actions Shell"
3132
GIT_AUTHOR_NAME: "GitHub Actions Shell"
3233
EMAIL: "github-actions[bot]@users.noreply.github.com"
3334

3435
- name: "Dependency Review"
35-
uses: "actions/dependency-review-action@9129d7d40b8c12c1ed0f60400d00c92d437adcce" # v4.1.3
36+
uses: "actions/dependency-review-action@72eb03d02c7872a771aacd928f3123ac62ad6d3a" # v4.3.3

0 commit comments

Comments
 (0)