Compare commits

..
186 Commits
Author SHA1 Message Date
xixu-me 8a028ed239 fix(actions): avoid status event fan-out 2026-08-18 11:29:42 +08:00
xixu-me 12823a29fc fix(actions): retry Dependabot merge after checks 2026-08-18 11:25:31 +08:00
xixu-me 625f456f01 fix(ci): evaluate all Dependabot pull requests 2026-08-14 18:15:02 +08:00
xixu-me 787f59a6fa ci: trigger Dependabot auto-merge from workflow runs 2026-07-03 23:32:39 +08:00
xixu-me 7591fe6e74 ci: tolerate protected Dependabot workflow updates 2026-07-03 23:13:02 +08:00
xixu-me b9280aaa3a ci: add Dependabot auto merge workflow 2026-07-03 23:02:17 +08:00
xixu-me 8ed4f4fe71 fix: update LICENSE link format in README 2026-03-31 04:04:32 +08:00
xixu-me ab11fcfabc chore: switch license to MIT and refresh README 2026-03-31 04:01:42 +08:00
xixu-me c27e34a963 Fix copyright notice formatting in README 2025-10-12 17:48:56 +08:00
xixu-me b5fc50e236 Remove service configuration section from README
Deleted the 'Service Configuration' section from the README to streamline documentation and focus on location configuration details.
2025-07-14 10:18:36 +08:00
xixu-me 792540a0ee Update wording in README for META.js Customizer
Clarified the description of the META.js Customizer tool to refer to creating custom JavaScript instead of custom META.js.
2025-07-14 10:17:28 +08:00
xixu-me 2de8afcceb Clarify customization section in README
Updated README to specify that the customization section is in the JavaScript code, not the configuration file.
2025-07-14 10:16:54 +08:00
xixu-me 307c56f043 Clarify GitHub URL label in README
Updated the label for the GitHub URL from 'GitHub' to 'GitHub blob' to more accurately describe the link destination.
2025-07-14 10:15:13 +08:00
xixu-me 9ba7312a33 Update GitHub URL in README
Changed the import URL from GitHub Raw to the standard GitHub blob link for improved clarity and accessibility.
2025-07-14 10:14:30 +08:00
xixu-me 7de0450b81 Update section headers in README
Simplified the section headers for JavaScript and YAML configuration URLs by removing '(Dynamic)' and '(Static)' descriptors for clarity.
2025-07-14 10:12:24 +08:00
xixu-me 18c0f75e4c Update README with customization and related projects
Added information about the META.js Customizer web app and RFM rulesets integration. Expanded usage guidelines and introduced a new 'Related Projects' section for better user guidance. Minor wording improvements for clarity.
2025-07-14 10:11:40 +08:00
xixu-me 84d63043ed Update README with simplified META overview
Revised the README to provide a more concise and streamlined overview of META's features, usage, and customization options. Removed redundant sections and reorganized content for better readability and clarity.
2025-06-10 16:56:25 +08:00
xixu-me af3833183c Delete .github directory 2025-06-10 16:37:51 +08:00
xixu-me 3aad4f58b5 Update README.md 2025-05-27 23:03:15 +08:00
xixu-me ed784c8933 Update README.md 2025-05-27 21:28:32 +08:00
xixu-me ded7c0e75a Update README.md 2025-05-27 21:10:26 +08:00
xixu-me 45059ecb01 Update README.md 2025-05-27 20:45:04 +08:00
xixu-me 8d828284a8 Delete .github/FUNDING.yml 2025-05-27 20:10:07 +08:00
xixu-me 6c8bf804f7 Update README.md 2025-03-29 19:45:28 +08:00
xixu-me 848924697c Update README.md 2025-01-25 10:14:43 +08:00
xixu-me da0d8fa62b Update README.md 2025-01-25 10:12:56 +08:00
xixu-me e7762ac45a Delete run.yml 2025-01-14 19:01:48 +08:00
xixu-me 78076ac090 Create dependabot.yml 2025-01-14 18:45:12 +08:00
xixu-me d0b0d5ea8d Create run.yml 2025-01-14 18:43:17 +08:00
xixu-me 95a79e426b Delete generate-yaml-configuration.yml 2025-01-14 18:43:14 +08:00
xixu-me 852f30ed4e Delete check-and-purge-cdn-cache.yml 2025-01-14 18:43:12 +08:00
xixu-me 77d6e3c8ae Create check-and-purge-cdn-cache.yml 2025-01-14 18:37:03 +08:00
xixu-me 837f21b6ff Create generate-yaml-configuration.yml 2025-01-14 18:37:01 +08:00
xixu-me b199a5e73d Update README.md 2025-01-12 18:37:31 +08:00
xixu-me 8044ece749 Update README.md 2025-01-11 16:59:00 +08:00
xixu-me 8b404a8ee7 Update README.md 2025-01-11 16:55:15 +08:00
xixu-me a55e705bbe Update README.md 2025-01-11 16:54:10 +08:00
xixu-me acad00f9d4 Update README.md 2025-01-11 13:18:05 +08:00
xixu-me e323bde06e Update README.md 2025-01-10 02:15:09 +08:00
xixu-me 655cd09f97 Update README.md 2025-01-09 22:51:49 +08:00
xixu-me 774e62f424 Update README.md 2024-12-07 09:53:10 +08:00
xixu-me d0d4ac01df Update README.md 2024-11-04 12:16:58 +08:00
xixu-me a4d8144e9b Update README.md 2024-11-03 20:20:22 +08:00
xixu-me 90a26c8163 Update README.md 2024-11-03 19:57:14 +08:00
xixu-me ed69bf3155 Update README.md 2024-11-03 19:56:52 +08:00
xixu-me cfe8ac9677 Update README.md 2024-11-03 19:56:30 +08:00
xixu-me e30291a356 Update README.md 2024-11-03 19:51:35 +08:00
xixu-me debc730224 Update README.md 2024-11-03 19:50:42 +08:00
xixu-me 287c0cff4e Update README.md 2024-11-03 19:38:45 +08:00
xixu-me 05dc774bc8 Update README.md 2024-11-02 16:37:46 +08:00
xixu-me 7eeebf362a Update README.md 2024-10-29 21:28:55 +08:00
xixu-me 73ea14ccdf Update README.md 2024-10-13 23:22:40 +08:00
xixu-me 41feab091a Delete .github/workflows/validate-commit.yml 2024-10-11 20:56:35 +08:00
xixu-me 3e7f54632e Update validate-commit.yml 2024-10-11 20:53:18 +08:00
xixu-me 1e256e10b0 Create validate-commit.yml 2024-10-11 20:51:01 +08:00
xixu-me f347467a85 Delete .github/workflows/validate-commit.yml 2024-10-11 20:50:34 +08:00
xixu-me 4cab4cc656 Update validate-commit.yml 2024-10-11 20:48:53 +08:00
xixu-me b4ac71cd4a Update validate-commit.yml 2024-10-11 20:47:21 +08:00
xixu-me ac6eb7fc37 Update validate-commit.yml 2024-10-11 20:45:03 +08:00
xixu-me 1aafaa06cc Update validate-commit.yml 2024-10-11 20:40:33 +08:00
xixu-me 4af23243c9 Create validate-commit.yml 2024-10-11 20:35:20 +08:00
xixu-me 94cb212397 Create FUNDING.yml 2024-10-11 18:27:08 +08:00
xixu-me 12271383c5 Update README.md 2024-10-11 12:34:31 +08:00
xixu-me eec51c9dd0 Delete script.js 2024-10-11 12:27:53 +08:00
xixu-me 897f8823e5 Update script.js 2024-10-11 04:42:21 +08:00
xixu-me 67762ba695 Update script.js 2024-10-11 04:36:27 +08:00
xixu-me 93496eec2b Update script.js 2024-10-11 04:33:33 +08:00
xixu-me f02d757fa2 Update script.js 2024-10-11 04:28:49 +08:00
xixu-me a83e0d0229 Update script.js 2024-10-11 04:28:01 +08:00
xixu-me bf4c38af9c Update script.js 2024-10-11 04:25:28 +08:00
xixu-me 3be7654f81 Update script.js 2024-10-11 04:23:23 +08:00
xixu-me d6f4f41c80 Update script.js 2024-10-11 04:20:55 +08:00
xixu-me 86ffe68b6d Update script.js 2024-10-11 03:52:04 +08:00
xixu-me 77fb3a0e61 Update script.js 2024-10-11 03:48:57 +08:00
xixu-me 4c93d54601 Update script.js 2024-10-11 02:47:04 +08:00
xixu-me b37d3d979b Update README.md 2024-10-11 02:36:37 +08:00
xixu-me c3d2a6d357 Update README.md 2024-10-11 02:20:41 +08:00
xixu-me a0be2524ef Update README.md 2024-10-11 02:19:51 +08:00
xixu-me 11f7d9109a Update README.md 2024-10-11 02:11:21 +08:00
xixu-me eb45d33204 Update README.md 2024-10-11 01:48:10 +08:00
xixu-me 3171e0474b Update README.md 2024-10-11 01:13:44 +08:00
xixu-me a40710b8d5 Update README.md 2024-10-11 01:10:28 +08:00
xixu-me a64665cf3b Update script.js 2024-10-11 00:53:14 +08:00
xixu-me c07f563f39 Update README.md 2024-10-11 00:16:31 +08:00
xixu-me f326d712cd Update README.md 2024-10-11 00:09:46 +08:00
xixu-me 60a6091db5 Update README.md 2024-10-11 00:09:16 +08:00
xixu-me 82498ce45e Update README.md 2024-10-11 00:07:01 +08:00
xixu-me e4dab2c993 Update README.md 2024-10-11 00:05:25 +08:00
xixu-me 49cb695d1f Update README.md 2024-10-11 00:02:06 +08:00
xixu-me a06b63a81c Update README.md 2024-10-10 23:58:52 +08:00
xixu-me 9391902934 Update README.md 2024-10-10 23:43:26 +08:00
xixu-me dd07797b11 Update README.md 2024-10-10 23:29:27 +08:00
xixu-me aa87f219f3 Update script.js 2024-10-10 19:15:49 +08:00
xixu-me 3ae6d4f68a Update script.js 2024-10-10 19:03:40 +08:00
xixu-me 745f912475 Update script.js 2024-10-10 16:41:10 +08:00
xixu-me 315146571a Update script.js 2024-10-10 16:38:18 +08:00
xixu-me 392f052478 Update script.js 2024-10-10 16:37:01 +08:00
xixu-me a391e527da Update script.js 2024-10-10 16:30:22 +08:00
xixu-me a27c6438df Update script.js 2024-10-10 16:26:14 +08:00
xixu-me c0f277ba46 Update script.js 2024-10-10 16:19:27 +08:00
xixu-me dc9e856564 Update script.js 2024-10-10 16:12:41 +08:00
xixu-me 1cf27d8914 Update script.js 2024-10-10 15:48:37 +08:00
xixu-me 0b8d1d4663 Update README.md 2024-10-10 15:33:55 +08:00
xixu-me cd28e1f29e Update script.js 2024-10-10 15:27:23 +08:00
xixu-me f17715093c Update script.js 2024-10-10 14:39:37 +08:00
xixu-me e3ed4dfb4f Update script.js 2024-10-10 14:04:06 +08:00
xixu-me 7dd3431916 Update script.js 2024-10-10 13:42:39 +08:00
xixu-me 66939b5eb9 Update script.js 2024-10-10 13:27:20 +08:00
xixu-me a95b5a9c1f Update script.js 2024-10-10 13:26:43 +08:00
xixu-me db3ae9d0a6 Update script.js 2024-10-10 13:19:03 +08:00
xixu-me aa1eb1072f Update script.js 2024-10-10 02:17:20 +08:00
xixu-me f8a5d9470c Update script.js 2024-10-10 02:12:21 +08:00
xixu-me 728b97c405 Update script.js 2024-10-10 02:09:58 +08:00
xixu-me c6f6dcb3e9 Update script.js 2024-10-10 01:58:23 +08:00
xixu-me c3a217fb20 Update script.js 2024-10-10 01:56:58 +08:00
xixu-me 819d2303ab Update script.js 2024-10-10 01:41:57 +08:00
xixu-me 01d5e810e7 Update script.js 2024-10-10 01:36:19 +08:00
xixu-me 905fbd0ff5 Update script.js 2024-10-10 01:32:10 +08:00
xixu-me 50b0cd47e6 Update script.js 2024-10-10 01:14:53 +08:00
xixu-me 7ca3977bb0 Update script.js 2024-10-10 01:08:06 +08:00
xixu-me edd9bc9252 Update script.js 2024-10-10 01:04:12 +08:00
xixu-me e45e979f4e Update script.js 2024-10-10 00:58:35 +08:00
xixu-me 8c627ea05b Update script.js 2024-10-10 00:54:15 +08:00
xixu-me f2f1b1f708 Update script.js 2024-10-10 00:46:27 +08:00
xixu-me 316fb81f1e Update script.js 2024-10-10 00:33:47 +08:00
xixu-me afaa5efad8 Update script.js 2024-10-10 00:18:14 +08:00
xixu-me ad0f198f18 Update script.js 2024-10-09 20:31:31 +08:00
xixu-me 2797d03ede Update script.js 2024-10-09 20:05:06 +08:00
xixu-me ab4626f2db Update script.js 2024-10-09 19:11:51 +08:00
xixu-me 9fe412cb4a Update script.js 2024-10-09 19:08:36 +08:00
xixu-me 2b6f2b3366 Update script.js 2024-10-09 19:06:16 +08:00
xixu-me 6c01c4807c Update script.js 2024-10-09 16:26:06 +08:00
xixu-me 6456674ab9 Update script.js 2024-10-09 10:59:13 +08:00
xixu-me b3d82d8fbc Update script.js 2024-10-09 02:36:32 +08:00
xixu-me 2490ac85bb Update script.js 2024-10-09 02:34:52 +08:00
xixu-me 558da59ac6 Update script.js 2024-10-09 02:30:00 +08:00
xixu-me 4b176e83d3 Update script.js 2024-10-09 02:14:16 +08:00
xixu-me 77c98b4b15 Update script.js 2024-10-09 02:11:26 +08:00
xixu-me 0bc222697c Update script.js 2024-10-09 02:07:39 +08:00
xixu-me cbdf386f37 Update script.js 2024-10-09 01:53:39 +08:00
xixu-me 789843330c Update script.js 2024-10-09 01:41:53 +08:00
xixu-me d85093aad9 Update script.js 2024-10-09 01:21:02 +08:00
xixu-me 3c119bce00 Update script.js 2024-10-09 00:21:21 +08:00
xixu-me 76d1419e24 Update script.js 2024-10-08 23:54:56 +08:00
xixu-me fb4295f423 Update script.js 2024-10-08 23:41:26 +08:00
xixu-me 6c0987fca9 Update script.js 2024-10-08 22:23:55 +08:00
xixu-me c6649ba9f3 Update script.js 2024-10-08 21:34:22 +08:00
xixu-me 4604db1e91 Update script.js 2024-10-08 20:53:39 +08:00
xixu-me 0821a9fd3b Update README.md 2024-10-08 20:53:29 +08:00
xixu-me e2bb9e6fca Update README.md 2024-10-08 20:52:40 +08:00
xixu-me 69a58eefe9 Update script.js 2024-10-08 18:28:50 +08:00
xixu-me 9b767927f3 Update script.js 2024-10-08 17:45:03 +08:00
xixu-me f4c823a2b0 Update script.js 2024-10-08 17:40:53 +08:00
xixu-me 04897cb8e3 Update script.js 2024-10-08 17:35:13 +08:00
xixu-me bdbbd1da6c Update README.md 2024-10-08 17:14:23 +08:00
xixu-me 651a17fc6e Update README.md 2024-10-08 17:10:25 +08:00
xixu-me e39f5570b5 Update script.js 2024-10-08 17:04:27 +08:00
xixu-me 1a76e0d38b Update script.js 2024-10-08 16:56:20 +08:00
xixu-me 487361e13f Update script.js 2024-10-08 16:38:45 +08:00
xixu-me 6ddab4b5fc Update script.js 2024-10-08 16:24:55 +08:00
xixu-me 1f7cc824dd Update script.js 2024-10-08 13:36:42 +08:00
xixu-me 281d033eb7 Update script.js 2024-10-08 13:33:01 +08:00
xixu-me 60c2df8d09 Update script.js 2024-10-08 13:29:36 +08:00
xixu-me f2d3488baa Update script.js 2024-10-08 13:28:04 +08:00
xixu-me f2724b90ec Update script.js 2024-10-08 13:24:27 +08:00
xixu-me fbaa94ffb1 Update script.js 2024-10-08 13:23:10 +08:00
xixu-me 373e0aac94 Update script.js 2024-10-08 12:38:42 +08:00
xixu-me d048756989 Update README.md 2024-10-08 09:39:26 +08:00
xixu-me 7984fab79d Update script.js 2024-10-08 01:17:27 +08:00
xixu-me 8dd895f783 Update script.js 2024-10-08 01:11:50 +08:00
xixu-me 0eae6c952a Update script.js 2024-10-08 01:07:19 +08:00
xixu-me e9ddf7e514 Update script.js 2024-10-08 00:14:32 +08:00
xixu-me 6a3f2c8b6d Update script.js 2024-10-08 00:12:08 +08:00
xixu-me a39df14b6e Update script.js 2024-10-08 00:09:40 +08:00
xixu-me 6dfe760a9f Update script.js 2024-10-08 00:03:59 +08:00
xixu-me f2eb7405d3 Update script.js 2024-10-07 23:56:04 +08:00
xixu-me 7ae7161045 Update script.js 2024-10-07 16:06:57 +08:00
xixu-me fc1b861763 Update script.js 2024-10-07 09:44:35 +08:00
xixu-me f7166a158f Update script.js 2024-10-07 08:38:55 +08:00
xixu-me 4cd5611f33 Update script.js 2024-10-07 08:27:25 +08:00
xixu-me 68045dd393 Update script.js 2024-10-07 07:43:52 +08:00
xixu-me 794c6a4aab Update script.js 2024-10-07 07:19:22 +08:00
xixu-me b66097d25d Update script.js 2024-10-07 03:14:08 +08:00
xixu-me 9edec1c833 Update README.md 2024-10-07 02:43:07 +08:00
xixu-me a8d39678d5 Create script.js 2024-10-07 02:18:11 +08:00
xixu-me f7004addfe Initial commit 2024-10-07 02:10:56 +08:00
4 changed files with 327 additions and 2274 deletions

No files matched your search

+201
View File
@@ -0,0 +1,201 @@
name: Dependabot Auto Merge
on:
check_suite:
types: [completed]
workflow_run:
workflows:
- "CodeQL"
- "The Workflow"
types:
- 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:
merge:
name: Auto-merge Dependabot PRs
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Merge Dependabot PRs when checks pass
uses: actions/github-script@v9
with:
script: |
const owner = context.repo.owner;
const repo = context.repo.repo;
const successfulCheckConclusions = new Set(["success", "skipped", "neutral"]);
const successfulStatusStates = new Set(["success"]);
const wait = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
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);
}
}
}
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2026 Xi Xu
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-2274
View File
File diff suppressed because it is too large. Load diff
+105
View File
@@ -0,0 +1,105 @@
# META
META stands for Modular Enhanced Traffic Architecture.
That idea shapes the project itself: the inputs stay modular, the generated output adds stronger routing structure on top, and the overall repository is organized as an architecture with clear roles for source, validation, and published artifacts.
The repository currently uses a split branch model:
- `main`: project documentation
- `script`: source code, tests, and GitHub Actions workflow
- `config`: generated `META.yaml`
> [!NOTE]
> If you want to use or customize META, the source of truth is the `script` branch. The `config` branch is generated from it after CI passes.
## What META Generates
META starts from your existing proxy configuration and builds a layered traffic profile instead of leaving you with a flat set of raw inputs:
- Service-oriented policy groups
- Location-based groups with `select`, `url-test`, `fallback`, and multiple load-balancing strategies
- DNS, TUN, rule providers, and routing rules for a broad range of network environments
- A published YAML artifact for users who prefer a static configuration
The generator preserves your original proxies or proxy providers, then injects META's standardized policy groups and rules on top.
## Import URLs
META currently documents both direct raw access and [Xget](https://github.com/xixu-me/xget) for remote imports.
### JavaScript
| Source | URL |
| --- | --- |
| GitHub Raw | <https://raw.githubusercontent.com/xixu-me/meta/refs/heads/script/META.js> |
| Xget | <https://xget.xi-xu.me/gh/xixu-me/meta/raw/refs/heads/script/META.js> |
### YAML
| Source | URL |
| --- | --- |
| GitHub Raw | <https://raw.githubusercontent.com/xixu-me/meta/refs/heads/config/META.yaml> |
| Xget | <https://xget.xi-xu.me/gh/xixu-me/meta/raw/refs/heads/config/META.yaml> |
## Customization
`META.js` is intentionally organized so the top section is the only part most users need to edit:
```javascript
// ################################################### this section can be flexibly customized ###################################################
```
The main customization points are:
- `STATIC_PROXY_COUNT`: number of static groups for IP-sensitive services
- `services`: service list and icon/domain metadata
- `locations`: country and region groups, including keywords, country codes, and emoji matchers
META derives the more error-prone parts, such as location filter regexes, from this top-level data so the editable surface stays small while the generated structure stays rich.
For a GUI-based workflow, use [META.js Customizer](https://github.com/xixu-me/META.js-Customizer) at [metajs.xi-xu.me](https://metajs.xi-xu.me).
## RFM Integration
META is built around [RFM](https://github.com/xixu-me/rfm), which provides the ruleset foundation for the generated configuration.
- META consumes RFM rulesets as its primary rule-provider source
- Domain, classical, and IP-based routing behavior are organized around RFM outputs
- Keeping RFM current directly improves the quality and coverage of META's generated configuration
Within the overall project structure, META acts as the assembly layer while RFM supplies the ruleset base that gives the generated output its breadth and consistency.
## Maintenance
The branches are intentionally separated:
- `script` is where generator changes, tests, and workflow updates happen
- `config` is force-updated by GitHub Actions with the latest generated YAML
- `main` is the stable documentation entrypoint for the project
The source branch uses Bun for local verification and publishes the generated YAML only after automated checks pass. This keeps the documentation branch, source branch, and generated branch aligned without turning the main README into a workflow manual.
## Design Notes
The project leans into the meaning behind its name: small editable building blocks, stronger generated defaults, and a structure that can scale without turning into a monolithic config blob.
- It treats service routing as the primary UX surface instead of exposing only raw proxy groups
- It generates several per-location strategies automatically so users can switch between stability and performance without editing rules
- It keeps source validation strict enough to catch malformed inputs while still supporting special outbound forms used by the underlying ecosystem
- It favors portable defaults so the generated configuration travels better across different clients and environments
## Related Projects
- [META.js Customizer](https://github.com/xixu-me/META.js-Customizer): browser-based META configuration builder
- [RFM](https://github.com/xixu-me/rfm): ruleset backbone used by META
## Disclaimer
- META is a configuration generator. You are responsible for how you deploy and use the generated configuration.
- Compatibility can change as clients, parsers, and third-party services evolve.
- Review generated output before using it in environments where routing, privacy, or availability is sensitive.
## License
Licensed under the MIT License. See [`LICENSE`](./LICENSE).