Skip to content

Commit

Permalink
Merge branch 'main' into use-aqua-for-lychee
Browse files Browse the repository at this point in the history
  • Loading branch information
risu729 authored Jan 2, 2025
2 parents cda1df3 + 8792885 commit d3bede3
Show file tree
Hide file tree
Showing 18 changed files with 214 additions and 167 deletions.
2 changes: 0 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
* text=auto eol=lf
# cspell:ignore lockb
*.lockb binary diff=lockb
.gitignore linguist-generated=true
8 changes: 5 additions & 3 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,19 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false

- name: Install mise
uses: jdx/mise-action@5bb8f8c1911837cf42064e6490e7634fc842ee7e # v2.1.8
uses: jdx/mise-action@5083fe46898c414b2475087cc79da59e7da859e8 # v2.1.11
with:
version: 2024.12.14
version: 2024.12.24
cache_save: ${{ github.ref_name == 'main' }}
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Run autofix
run: mise run check
run: mise run check --continue-on-error
continue-on-error: true

- name: autofix.ci
Expand Down
23 changes: 15 additions & 8 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,23 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false

- name: Install mise
uses: jdx/mise-action@5bb8f8c1911837cf42064e6490e7634fc842ee7e # v2.1.8
uses: jdx/mise-action@5083fe46898c414b2475087cc79da59e7da859e8 # v2.1.11
with:
version: 2024.12.14
version: 2024.12.24
cache_save: ${{ github.ref_name == 'main' }}
env:
GITHUB_TOKEN: ${{ github.token }}

- name: List mise tasks
id: list
run: |
tasks=$(mise tasks ls --json --hidden \
tasks=$(mise tasks ls --json \
| jq --raw-output --compact-output \
'map(select(.name | test("^(ci:|lint:)")) | {name: (.name | sub("^(ci:|lint:)" ; "")), task: .name})')
'map(select(.name | test("^(check:)")) | {name: (.name | sub("^.+:" ; "")), task: .name})')
echo "tasks=${tasks}" >> "${GITHUB_OUTPUT}"
lint:
Expand All @@ -66,17 +68,21 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false

- name: Install mise
uses: jdx/mise-action@5bb8f8c1911837cf42064e6490e7634fc842ee7e # v2.1.8
uses: jdx/mise-action@5083fe46898c414b2475087cc79da59e7da859e8 # v2.1.11
with:
version: 2024.12.14
version: 2024.12.24
cache_save: ${{ github.ref_name == 'main' }}
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Run ${{ matrix.name }}
run: mise run ${{ matrix.task }}
env:
LINT: true

commitlint:
runs-on: ubuntu-24.04
Expand All @@ -89,11 +95,12 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0 # fetch all history for commitlint
persist-credentials: false

- name: Install mise
uses: jdx/mise-action@5bb8f8c1911837cf42064e6490e7634fc842ee7e # v2.1.8
uses: jdx/mise-action@5083fe46898c414b2475087cc79da59e7da859e8 # v2.1.11
with:
version: 2024.12.14
version: 2024.12.24
cache_save: ${{ github.ref_name == 'main' }}
env:
GITHUB_TOKEN: ${{ github.token }}
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/pr-updater.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,21 @@ jobs:
steps:
- name: Create GitHub App token
id: app-token
uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
uses: actions/create-github-app-token@c1a285145b9d317df6ced56c09f525b5c2b6f755 # v1.11.1
with:
app-id: ${{ vars.PR_UPDATER_APP_ID }}
private-key: ${{ secrets.PR_UPDATER_SECRET_KEY }}

- name: List PRs
id: list-prs
run: |
numbers=$(gh pr list --repo ${{ github.repository }} --json number --jq 'map(.number)' ${{
github.event_name == 'workflow_dispatch' && github.ref_name != github.event.repository.default_branch
&& format('--head {0}', github.ref_name)
|| ''
}})
numbers=$(gh pr list --repo ${{ github.repository }} \
--json number,headRefName \
--jq '[.[] | select(.headRefName | startswith("renovate/") | not) | .number]' ${{
github.event_name == 'workflow_dispatch' && github.ref_name != github.event.repository.default_branch
&& format('--head {0}', github.ref_name)
|| ''
}})
echo "numbers=${numbers}" > "${GITHUB_OUTPUT}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/worker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,18 @@ jobs:
tasks/*
worker/*
sparse-checkout-cone-mode: false
persist-credentials: false

- name: Install mise
uses: jdx/mise-action@5bb8f8c1911837cf42064e6490e7634fc842ee7e # v2.1.8
uses: jdx/mise-action@5083fe46898c414b2475087cc79da59e7da859e8 # v2.1.11
with:
version: 2024.12.14
version: 2024.12.24
cache_save: ${{ github.ref_name == 'main' }}
env:
GITHUB_TOKEN: ${{ github.token }}

- name: Run tests
run: mise run worker:test:ci
run: mise run worker:test

deploy-worker:
needs:
Expand All @@ -68,11 +69,12 @@ jobs:
tasks/*
worker/*
sparse-checkout-cone-mode: false
persist-credentials: false

- name: Install mise
uses: jdx/mise-action@5bb8f8c1911837cf42064e6490e7634fc842ee7e # v2.1.8
uses: jdx/mise-action@5083fe46898c414b2475087cc79da59e7da859e8 # v2.1.11
with:
version: 2024.12.14
version: 2024.12.24
cache_save: ${{ github.ref_name == 'main' }}
env:
GITHUB_TOKEN: ${{ github.token }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/wsl-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ jobs:

steps:
- name: Install mise
uses: jdx/mise-action@5bb8f8c1911837cf42064e6490e7634fc842ee7e # v2.1.8
uses: jdx/mise-action@5083fe46898c414b2475087cc79da59e7da859e8 # v2.1.11
with:
version: 2024.12.14
version: 2024.12.24
# cspell:ignore kellyjonbrazil
mise_toml: |
[tools]
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"winget.json": "jsonc",
"gpg-agent.conf": "plaintext",
// match on the absolute path if / is contained
"**/mise-tasks/**": "shellscript",
"**/tasks/**": "shellscript",
"**/wsl/etc/**": "plaintext"
},

Expand Down
20 changes: 11 additions & 9 deletions commitlint.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
import conventionalConfig from "@commitlint/config-conventional";
import type { UserConfig } from "@commitlint/types";

// exclude isBreaking, breaking, and breakingBody because this package does not have versioning
// exclude isIssueAffected, issuesBody, and issues because I link branches to issues using GitHub
const questions: string[] = [
"type",
"scope",
"subject",
"body",
const excludeQuestions: string[] = [
// exclude isBreaking, breaking, and breakingBody because this package does not have versioning
"isBreaking",
"breaking",
"breakingBody",
// exclude isIssueAffected, issuesBody, and issues because I link branches to issues using GitHub
"isIssueAffected",
"issuesBody",
"issues",
] satisfies (keyof typeof conventionalConfig.prompt.questions)[];

const commitlintConfig: UserConfig = {
Expand All @@ -18,8 +20,8 @@ const commitlintConfig: UserConfig = {
prompt: {
...conventionalConfig.prompt,
questions: Object.fromEntries(
Object.entries(conventionalConfig.prompt.questions).filter(([key]) =>
questions.includes(key),
Object.entries(conventionalConfig.prompt.questions).filter(
([key]) => !excludeQuestions.includes(key),
),
),
},
Expand Down
65 changes: 65 additions & 0 deletions github/rulesets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"name": "main",
"target": "branch",
"enforcement": "active",
"conditions": {
"ref_name": {
"exclude": [],
"include": ["~DEFAULT_BRANCH"]
}
},
"rules": [
{
"type": "deletion"
},
{
"type": "non_fast_forward"
},
{
"type": "creation"
},
{
"type": "required_linear_history"
},
{
"type": "pull_request",
"parameters": {
"required_approving_review_count": 0,
"dismiss_stale_reviews_on_push": true,
"require_code_owner_review": false,
"require_last_push_approval": false,
"required_review_thread_resolution": false,
"automatic_copilot_code_review_enabled": false,
"allowed_merge_methods": ["squash"]
}
},
{
"type": "required_status_checks",
"parameters": {
"strict_required_status_checks_policy": false,
"do_not_enforce_on_create": false,
"required_status_checks": [
{
"context": "merge-gatekeeper"
}
]
}
},
{
"type": "required_signatures"
},
{
"type": "code_scanning",
"parameters": {
"code_scanning_tools": [
{
"tool": "CodeQL",
"security_alerts_threshold": "all",
"alerts_threshold": "all"
}
]
}
}
],
"bypass_actors": []
}
2 changes: 1 addition & 1 deletion lychee.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ exclude = [
# wsl/install.sh
# can't be accessed
"https://mise.jdx.dev/deb",
# mise-tasks/worker/wrangler-args
# tasks/worker/wrangler-args
# an example of a url with authentication
"https://[email protected]/owner/repo",
]
21 changes: 11 additions & 10 deletions mise.toml
Original file line number Diff line number Diff line change
@@ -1,32 +1,33 @@
# ref: https://mise.jdx.dev/configuration.html
#:schema https://mise.jdx.dev/schema/mise.json

min_version = "2024.12.14"
min_version = "2024.12.24"

[tools]
bun = "1.1.40"
node = "23.4.0"
uv = "0.5.10"
bun = "1.1.42"
node = "23.5.0"
uv = "0.5.13"
"aqua:biomejs/biome" = "1.9.4"
actionlint = "1.7.4"
actionlint = "1.7.5"
# renovate: extractVersion=^v(?<version>.+)
"aqua:suzuki-shunsuke/ghalint" = "1.1.0" # cspell:ignore shunsuke
"aqua:suzuki-shunsuke/ghalint" = "1.2.1" # cspell:ignore shunsuke
# renovate: extractVersion=^v(?<version>.+)
"aqua:suzuki-shunsuke/pinact" = "1.0.0"
"aqua:suzuki-shunsuke/pinact" = "1.1.2"
# cspell:ignore tamasfe
# renovate: packageName=tamasfe/taplo
taplo = "0.9.3"
"npm:prettier" = "3.4.2"
markdownlint-cli2 = "0.16.0"
markdownlint-cli2 = "0.17.1"
shfmt = "3.10.0"
shellcheck = "0.10.0"
yamlfmt = "0.14.0"
yamllint = "1.35.1"
"npm:renovate" = "39.75.0"
"npm:renovate" = "39.86.4"
"npm:cspell" = "8.17.1"
# cspell:ignore lycheeverse
"aqua:lycheeverse/lychee" = "0.18.0"
"npm:ignore-sync" = "7.0.1"
typos = "1.29.0"
"npm:ignore-sync" = "8.0.0"

[settings]
experimental = true
Expand Down
Loading

0 comments on commit d3bede3

Please sign in to comment.