Compare commits

..
51 Commits
Author SHA1 Message Date
xixu-me 86c83f9060 fix(actions): avoid status event fan-out
CI / Validate (windows-latest) (push) Waiting to run
CI / Validate (ubuntu-latest) (push) Waiting to run
2026-08-18 11:29:52 +08:00
xixu-me 846895a706 fix(actions): retry Dependabot merge after checks 2026-08-18 11:25:21 +08:00
xixu-me 98d22c75dd fix(ci): format Dependabot workflow 2026-08-17 10:25:38 +08:00
xixu-me 87231d5146 fix(ci): evaluate all Dependabot pull requests 2026-08-14 18:15:04 +08:00
github-actions[bot] 177eacbc88 Merge pull request #16 from xixu-me/dependabot/github_actions/github-actions-901392d03b
chore(deps): bump the github-actions group across 1 directory with 2 updates
2026-07-27 01:18:11 +00:00
dependabot[bot] b809d18499 chore(deps): bump the github-actions group across 1 directory with 2 updates
Bumps the github-actions group with 2 updates in the / directory: [actions/checkout](https://github.com/actions/checkout) and [actions/setup-node](https://github.com/actions/setup-node).


Updates `actions/checkout` from 7.0.0 to 7.0.1
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0...3d3c42e5aac5ba805825da76410c181273ba90b1)

Updates `actions/setup-node` from 6.4.0 to 7.0.0
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e...820762786026740c76f36085b0efc47a31fe5020)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 7.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
- dependency-name: actions/setup-node
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-27 01:17:23 +00:00
github-actions[bot] 8f17dce6ce Merge pull request #15 from xixu-me/dependabot/bun/bun-dependencies-f8ec6eb6c9
chore(deps-dev): bump prettier from 3.9.5 to 3.9.6 in the bun-dependencies group
2026-07-27 01:08:13 +00:00
dependabot[bot] e30aa55204 chore(deps-dev): bump prettier in the bun-dependencies group
Bumps the bun-dependencies group with 1 update: [prettier](https://github.com/prettier/prettier).


Updates `prettier` from 3.9.5 to 3.9.6
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.9.5...3.9.6)

---
updated-dependencies:
- dependency-name: prettier
  dependency-version: 3.9.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: bun-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-27 01:07:16 +00:00
github-actions[bot] bd2e358716 Merge pull request #13 from xixu-me/dependabot/bun/bun-dependencies-984b171149
chore(deps-dev): bump prettier from 3.9.4 to 3.9.5 in the bun-dependencies group
2026-07-13 01:08:21 +00:00
dependabot[bot] 0c29baf909 chore(deps-dev): bump prettier in the bun-dependencies group
Bumps the bun-dependencies group with 1 update: [prettier](https://github.com/prettier/prettier).


Updates `prettier` from 3.9.4 to 3.9.5
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.9.4...3.9.5)

---
updated-dependencies:
- dependency-name: prettier
  dependency-version: 3.9.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: bun-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-13 01:07:11 +00:00
github-actions[bot] cedbbe112c Merge pull request #12 from xixu-me/dependabot/bun/bun-dependencies-13a0c47181
chore(deps-dev): bump prettier from 3.9.1 to 3.9.4 in the bun-dependencies group
2026-07-06 01:07:14 +00:00
dependabot[bot] ae9989b9a7 chore(deps-dev): bump prettier in the bun-dependencies group
Bumps the bun-dependencies group with 1 update: [prettier](https://github.com/prettier/prettier).


Updates `prettier` from 3.9.1 to 3.9.4
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.9.1...3.9.4)

---
updated-dependencies:
- dependency-name: prettier
  dependency-version: 3.9.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: bun-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-06 01:06:11 +00:00
xixu-me 3d00ab0f2d ci: trigger Dependabot auto-merge from workflow runs 2026-07-03 23:33:46 +08:00
xixu-me 5036e87892 ci: tolerate protected Dependabot workflow updates 2026-07-03 23:13:55 +08:00
xixu-me 0d28fdf1dd ci: add Dependabot auto merge workflow 2026-07-03 23:03:09 +08:00
github-actions[bot] e08655ab75 Merge pull request #11 from xixu-me/dependabot/bun/bun-dependencies-d62044d6eb
chore(deps-dev): bump prettier from 3.8.4 to 3.9.1 in the bun-dependencies group
2026-06-29 01:06:41 +00:00
dependabot[bot] b597cd4b5c chore(deps-dev): bump prettier in the bun-dependencies group
Bumps the bun-dependencies group with 1 update: [prettier](https://github.com/prettier/prettier).


Updates `prettier` from 3.8.4 to 3.9.1
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.8.4...3.9.1)

---
updated-dependencies:
- dependency-name: prettier
  dependency-version: 3.9.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: bun-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-29 01:06:27 +00:00
github-actions[bot] cd30a3afcb Merge pull request #10 from xixu-me/dependabot/github_actions/github-actions-2217aebe03
chore(deps): bump actions/checkout from 6.0.3 to 7.0.0 in the github-actions group
2026-06-22 01:17:25 +00:00
dependabot[bot] 50ec0f6ed7 chore(deps): bump actions/checkout in the github-actions group
Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout).


Updates `actions/checkout` from 6.0.3 to 7.0.0
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/df4cb1c069e1874edd31b4311f1884172cec0e10...9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-22 01:17:13 +00:00
github-actions[bot] 5039ffcc0c Merge pull request #9 from xixu-me/dependabot/bun/bun-dependencies-de759b0c8c
chore(deps-dev): bump prettier from 3.8.3 to 3.8.4 in the bun-dependencies group
2026-06-15 01:07:17 +00:00
dependabot[bot] 17b5ff7b0a chore(deps-dev): bump prettier in the bun-dependencies group
Bumps the bun-dependencies group with 1 update: [prettier](https://github.com/prettier/prettier).


Updates `prettier` from 3.8.3 to 3.8.4
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.8.3...3.8.4)

---
updated-dependencies:
- dependency-name: prettier
  dependency-version: 3.8.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: bun-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-15 01:06:56 +00:00
github-actions[bot] 2f1e15bbd3 Merge pull request #8 from xixu-me/dependabot/github_actions/github-actions-6a98abd9ac
chore(deps): bump actions/checkout from 6.0.2 to 6.0.3 in the github-actions group
2026-06-08 01:17:30 +00:00
dependabot[bot] 119ad847c7 chore(deps): bump actions/checkout in the github-actions group
Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout).


Updates `actions/checkout` from 6.0.2 to 6.0.3
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/de0fac2e4500dabe0009e67214ff5f5447ce83dd...df4cb1c069e1874edd31b4311f1884172cec0e10)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-08 01:17:19 +00:00
github-actions[bot] 48b6f0ca96 Merge pull request #7 from xixu-me/dependabot/github_actions/github-actions-2661ef2cb7
chore(deps): bump actions/dependency-review-action from 4.9.0 to 5.0.0 in the github-actions group
2026-05-11 01:27:28 +00:00
dependabot[bot] 3e4b89ba54 chore(deps): bump actions/dependency-review-action
Bumps the github-actions group with 1 update: [actions/dependency-review-action](https://github.com/actions/dependency-review-action).


Updates `actions/dependency-review-action` from 4.9.0 to 5.0.0
- [Release notes](https://github.com/actions/dependency-review-action/releases)
- [Commits](https://github.com/actions/dependency-review-action/compare/2031cfc080254a8a887f58cffee85186f0e49e48...a1d282b36b6f3519aa1f3fc636f609c47dddb294)

---
updated-dependencies:
- dependency-name: actions/dependency-review-action
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-11 01:27:17 +00:00
github-actions[bot] 956b85b9f0 Merge pull request #6 from xixu-me/dependabot/github_actions/github-actions-bc6d0019b4
chore(deps): bump the github-actions group with 2 updates
2026-04-27 01:22:55 +00:00
dependabot[bot] 8779f1c6c6 chore(deps): bump the github-actions group with 2 updates
Bumps the github-actions group with 2 updates: [actions/setup-node](https://github.com/actions/setup-node) and [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata).


Updates `actions/setup-node` from 6.3.0 to 6.4.0
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/53b83947a5a98c8d113130e565377fae1a50d02f...48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e)

Updates `dependabot/fetch-metadata` from 3.0.0 to 3.1.0
- [Release notes](https://github.com/dependabot/fetch-metadata/releases)
- [Commits](https://github.com/dependabot/fetch-metadata/compare/ffa630c65fa7e0ecfa0625b5ceda64399aea1b36...25dd0e34f4fe68f24cc83900b1fe3fe149efef98)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: 6.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
- dependency-name: dependabot/fetch-metadata
  dependency-version: 3.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-27 01:22:42 +00:00
github-actions[bot] 518e8de40f Merge pull request #4 from xixu-me/dependabot/bun/bun-dependencies-95ed20c41c
chore(deps-dev): bump prettier from 3.8.2 to 3.8.3 in the bun-dependencies group
2026-04-20 01:14:14 +00:00
dependabot[bot] 1426c03e36 chore(deps-dev): bump prettier in the bun-dependencies group
Bumps the bun-dependencies group with 1 update: [prettier](https://github.com/prettier/prettier).


Updates `prettier` from 3.8.2 to 3.8.3
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.8.2...3.8.3)

---
updated-dependencies:
- dependency-name: prettier
  dependency-version: 3.8.3
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: bun-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-20 01:14:03 +00:00
github-actions[bot] ddfa170d33 Merge pull request #3 from xixu-me/dependabot/bun/bun-dependencies-482c5ae6e5
chore(deps-dev): bump prettier from 3.8.1 to 3.8.2 in the bun-dependencies group
2026-04-13 01:14:26 +00:00
dependabot[bot] 1311c67cb2 chore(deps-dev): bump prettier in the bun-dependencies group
Bumps the bun-dependencies group with 1 update: [prettier](https://github.com/prettier/prettier).


Updates `prettier` from 3.8.1 to 3.8.2
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.8.1...3.8.2)

---
updated-dependencies:
- dependency-name: prettier
  dependency-version: 3.8.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: bun-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-13 01:14:10 +00:00
github-actions[bot] 3c0b080f04 Merge pull request #2 from xixu-me/dependabot/github_actions/github-actions-3fdce2bed3
chore(deps): bump dependabot/fetch-metadata from 2.5.0 to 3.0.0 in the github-actions group
2026-03-30 01:19:14 +00:00
dependabot[bot] 92317b6165 chore(deps): bump dependabot/fetch-metadata in the github-actions group
Bumps the github-actions group with 1 update: [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata).


Updates `dependabot/fetch-metadata` from 2.5.0 to 3.0.0
- [Release notes](https://github.com/dependabot/fetch-metadata/releases)
- [Commits](https://github.com/dependabot/fetch-metadata/compare/21025c705c08248db411dc16f3619e6b5f9ea21a...ffa630c65fa7e0ecfa0625b5ceda64399aea1b36)

---
updated-dependencies:
- dependency-name: dependabot/fetch-metadata
  dependency-version: 3.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-30 01:19:03 +00:00
xixu-me da65db790c docs(readme): add npm downloads badge 2026-03-28 17:05:56 +08:00
xixu-me 076a58b775 chore: release 1.0.0 2026-03-27 10:51:14 +08:00
xixu-me 99dafdf804 fix(cli): correct skvlt command usage 2026-03-27 09:39:26 +08:00
xixu-me 630db3d96c fix(manifest): add generated file header 2026-03-27 05:05:47 +08:00
xixu-me ea344d4292 chore: add FUNDING.yml for sponsorship information 2026-03-27 03:35:23 +08:00
xixu-me 28d4a4f890 chore: release 1.1.0 2026-03-27 03:29:29 +08:00
xixu-me 8f00a2e9e7 ci: fix release workflow shell syntax 2026-03-27 03:20:35 +08:00
xixu-me ed3accec7d ci: tolerate npm version probe failures 2026-03-27 03:19:20 +08:00
xixu-me bdaf4ce239 ci: make release workflow idempotent 2026-03-27 03:17:56 +08:00
xixu-me 627b9389cf chore: release 1.0.0 2026-03-27 02:56:08 +08:00
xixu-me 13d025f906 fix(docs): update Bun reference in README files to include hyperlink 2026-03-27 02:44:54 +08:00
xixu-me 9f8257087b docs: refresh project docs and community templates 2026-03-27 02:42:37 +08:00
xixu-me 8ef4ad70d7 feat(cli): improve restore progress and command guidance 2026-03-27 01:50:45 +08:00
xixu-me 41dcda8cb5 fix: restore formatting and README link emphasis 2026-03-27 01:30:59 +08:00
xixu-me 0d4986ecea feat(cli): polish help and output rendering 2026-03-27 01:22:44 +08:00
xixu-me 39fd31247e test(packaging): align readme install assertion 2026-03-25 22:31:53 +08:00
github-actions[bot] de7ce5b2cd Merge pull request #1 from xixu-me/dependabot/github_actions/github-actions-20b45616f2
chore(deps): bump dependabot/fetch-metadata from 2.3.0 to 2.5.0 in the github-actions group
2026-03-25 14:25:26 +00:00
dependabot[bot] 7074d5d0de chore(deps): bump dependabot/fetch-metadata in the github-actions group
Bumps the github-actions group with 1 update: [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata).


Updates `dependabot/fetch-metadata` from 2.3.0 to 2.5.0
- [Release notes](https://github.com/dependabot/fetch-metadata/releases)
- [Commits](https://github.com/dependabot/fetch-metadata/compare/d7267f607e9d3fb96fc2fbe83e0af444713e90b7...21025c705c08248db411dc16f3619e6b5f9ea21a)

---
updated-dependencies:
- dependency-name: dependabot/fetch-metadata
  dependency-version: 2.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-25 14:21:49 +00:00
7 changed files with 198 additions and 40 deletions

No files matched your search

+2 -2
View File
@@ -66,10 +66,10 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- name: Setup Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020
with:
node-version: ${{ env.NODE_VERSION }}
+188 -27
View File
@@ -1,43 +1,204 @@
name: Dependabot Auto Merge
on:
pull_request:
branches:
- main
check_suite:
types: [completed]
workflow_run:
workflows:
- "CI"
- "CodeQL"
- "Dependabot Updates"
- "Dependency Review"
- "Release"
types:
- opened
- reopened
- synchronize
- ready_for_review
- completed
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.workflow_run.head_branch || github.run_id }}
cancel-in-progress: false
permissions:
contents: write
pull-requests: write
checks: read
statuses: read
jobs:
enable-auto-merge:
name: Approve and enable auto-merge
if: github.event.pull_request.user.login == 'dependabot[bot]' && github.event.pull_request.draft == false
merge:
name: Auto-merge Dependabot PRs
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@21025c705c08248db411dc16f3619e6b5f9ea21a
- name: Merge Dependabot PRs when checks pass
uses: actions/github-script@v9
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const owner = context.repo.owner;
const repo = context.repo.repo;
- name: Approve Dependabot pull request
continue-on-error: true
run: gh pr review --approve "$PR_URL"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_URL: ${{ github.event.pull_request.html_url }}
const successfulCheckConclusions = new Set(["success", "skipped", "neutral"]);
const successfulStatusStates = new Set(["success"]);
const wait = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
# Requires repository auto-merge to be enabled in GitHub settings.
- name: Enable auto-merge
run: gh pr merge --auto --merge "$PR_URL"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_URL: ${{ github.event.pull_request.html_url }}
const latestBy = (items, keyOf, timeOf) => {
const latest = new Map();
for (const item of items) {
const key = keyOf(item);
const itemTime = new Date(timeOf(item) || 0).getTime();
const existing = latest.get(key);
const existingTime = existing ? new Date(timeOf(existing) || 0).getTime() : -1;
if (!existing || itemTime >= existingTime) {
latest.set(key, item);
}
}
return [...latest.values()];
};
const findCandidatePulls = async () => {
const pulls = await github.paginate(github.rest.pulls.list, {
owner,
repo,
state: "open",
per_page: 100,
});
return pulls.filter((pr) => pr.user?.login === "dependabot[bot]");
};
const getMergeablePullRequest = async (pull_number) => {
for (let attempt = 1; attempt <= 6; attempt += 1) {
const { data: pr } = await github.rest.pulls.get({ owner, repo, pull_number });
if (pr.mergeable !== null) {
return pr;
}
core.info("PR #" + pull_number + " mergeability is still being computed; retry " + attempt + "/6.");
await wait(5000);
}
const { data: pr } = await github.rest.pulls.get({ owner, repo, pull_number });
return pr;
};
const getSignalState = async (sha) => {
const checkRuns = await github.paginate(github.rest.checks.listForRef, {
owner,
repo,
ref: sha,
per_page: 100,
});
const statuses = await github.paginate(github.rest.repos.listCommitStatusesForRef, {
owner,
repo,
ref: sha,
per_page: 100,
});
const latestChecks = latestBy(
checkRuns.filter((run) => run.name !== "Dependabot Auto Merge"),
(run) => (run.app?.slug || "unknown") + ":" + run.name,
(run) => run.completed_at || run.started_at || run.created_at,
);
const latestStatuses = latestBy(statuses, (status) => status.context, (status) => status.updated_at || status.created_at);
const pendingChecks = latestChecks.filter((run) => run.status !== "completed");
const failedChecks = latestChecks.filter(
(run) => run.status === "completed" && !successfulCheckConclusions.has(String(run.conclusion || "").toLowerCase()),
);
const failedStatuses = latestStatuses.filter((status) => !successfulStatusStates.has(String(status.state || "").toLowerCase()));
return {
totalSignals: latestChecks.length + latestStatuses.length,
pendingChecks,
failedChecks,
failedStatuses,
};
};
const { data: repository } = await github.rest.repos.get({ owner, repo });
const mergeMethods = [];
if (repository.allow_merge_commit) mergeMethods.push("merge");
if (repository.allow_squash_merge) mergeMethods.push("squash");
if (repository.allow_rebase_merge) mergeMethods.push("rebase");
if (mergeMethods.length === 0) {
core.info("This repository has no enabled pull request merge methods.");
return;
}
const pulls = await findCandidatePulls();
if (pulls.length === 0) {
core.info("No open Dependabot PRs to evaluate.");
return;
}
for (const candidate of pulls) {
const pull_number = candidate.number;
const pr = await getMergeablePullRequest(pull_number);
if (pr.user?.login !== "dependabot[bot]") {
core.info("PR #" + pull_number + " is no longer a Dependabot PR.");
continue;
}
if (pr.state !== "open" || pr.draft) {
core.info("PR #" + pull_number + " is not an open, ready PR.");
continue;
}
if (pr.mergeable !== true) {
core.info("PR #" + pull_number + " is not currently mergeable.");
continue;
}
const signalState = await getSignalState(pr.head.sha);
if (signalState.totalSignals === 0) {
core.info("PR #" + pull_number + " has no checks or statuses yet; skipping.");
continue;
}
if (signalState.pendingChecks.length > 0) {
core.info("PR #" + pull_number + " still has pending checks: " + signalState.pendingChecks.map((run) => run.name).join(", ") + ".");
continue;
}
if (signalState.failedChecks.length > 0 || signalState.failedStatuses.length > 0) {
const failedChecks = signalState.failedChecks.map((run) => run.name + "=" + run.conclusion).join(", ");
const failedStatuses = signalState.failedStatuses.map((status) => status.context + "=" + status.state).join(", ");
core.info("PR #" + pull_number + " is not green. Checks: " + (failedChecks || "none") + ". Statuses: " + (failedStatuses || "none") + ".");
continue;
}
let merged = false;
let lastError = null;
for (const merge_method of mergeMethods) {
try {
await github.rest.pulls.merge({ owner, repo, pull_number, merge_method });
core.info("Merged Dependabot PR #" + pull_number + " with " + merge_method + ".");
merged = true;
break;
} catch (error) {
lastError = error;
if (error.status === 403 || error.status === 405 || error.status === 409) {
core.info("Cannot merge PR #" + pull_number + " with " + merge_method + ": " + error.message);
continue;
}
throw error;
}
}
if (!merged) {
core.info("PR #" + pull_number + " could not be merged: " + (lastError?.message || "unknown error") + ".");
continue;
}
if (pr.head.repo?.full_name === owner + "/" + repo) {
try {
await github.rest.git.deleteRef({ owner, repo, ref: "heads/" + pr.head.ref });
core.info("Deleted branch " + pr.head.ref + ".");
} catch (error) {
core.info("Could not delete branch " + pr.head.ref + ": " + error.message);
}
}
}
+2 -2
View File
@@ -21,9 +21,9 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- name: Review dependency changes
uses: actions/dependency-review-action@2031cfc080254a8a887f58cffee85186f0e49e48
uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294
with:
config-file: ./.github/dependency-review-config.yml
+2 -2
View File
@@ -41,10 +41,10 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
- name: Setup Node.js
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: https://registry.npmjs.org
+1
View File
@@ -3,6 +3,7 @@
**_[汉语](./README.zh.md)_**
[![npm version](https://img.shields.io/npm/v/skvlt)](https://www.npmjs.com/package/skvlt)
[![npm downloads](https://img.shields.io/npm/dm/skvlt?label=downloads)](https://www.npmjs.com/package/skvlt)
[![CI](https://img.shields.io/github/actions/workflow/status/xixu-me/skills-vault/ci.yml?branch=main&label=ci)](https://github.com/xixu-me/skills-vault/actions/workflows/ci.yml)
[![Bun](https://img.shields.io/badge/Bun-%3E%3D1.3.11-f9f1e1)](https://bun.sh/)
[![License](https://img.shields.io/badge/license-MIT-blue)](./LICENSE)
+1
View File
@@ -3,6 +3,7 @@
**_[English](./README.md)_**
[![npm version](https://img.shields.io/npm/v/skvlt)](https://www.npmjs.com/package/skvlt)
[![npm downloads](https://img.shields.io/npm/dm/skvlt?label=downloads)](https://www.npmjs.com/package/skvlt)
[![CI](https://img.shields.io/github/actions/workflow/status/xixu-me/skills-vault/ci.yml?branch=main&label=ci)](https://github.com/xixu-me/skills-vault/actions/workflows/ci.yml)
[![Bun](https://img.shields.io/badge/Bun-%3E%3D1.3.11-f9f1e1)](https://bun.sh/)
[![License](https://img.shields.io/badge/license-MIT-blue)](./LICENSE)
+2 -7
View File
@@ -10,11 +10,6 @@
},
},
"packages": {
"prettier": [
"prettier@3.8.1",
"",
{ "bin": { "prettier": "bin/prettier.cjs" } },
"sha512-UOnG6LftzbdaHZcKoPFtOcCKztrQ57WkHDeRD9t/PTQtmT0NHSeWWepj6pS0z/N7+08BHFDQVUrfmfMRcZwbMg==",
],
},
"prettier": ["prettier@3.9.6", "", { "bin": { "prettier": "bin/prettier.cjs" } }, "sha512-OpN0zzVdiaiAhxpuuj5efpIS4sY9j7bY6uR5mnj5yPzGkdkjNKSJeUThPb60Jw29QuAZgA4o+/iB49kFiaBX6g=="],
}
}