chore: point MSD at git.golem15.com/golem15/msd-core
Some checks failed
Tests / PR mergeability (push) Successful in 1m37s
Tests / Base branch health (push) Successful in 11s
Tests / Detect test scope (push) Successful in 17s
Tests / lint-tests (push) Failing after 2m16s
Tests / plugin-validate (push) Successful in 1m6s
Tests / test (ubuntu-latest, 24, shard 1/3) (push) Failing after 25s
Tests / test (ubuntu-latest, 24, shard 2/3) (push) Failing after 20s
Tests / test (ubuntu-latest, 24, shard 3/3) (push) Failing after 20s
Tests / test (ubuntu-latest, 24) (push) Failing after 19s
Tests / test (inert CI) (push) Has been skipped
Tests / QA loop walk (smell ratchet) (push) Failing after 19s
Tests / Coverage gate (merged shards) (push) Has been skipped
Tests / Publish emitted-baseline artifact (push) Has been skipped
Dismiss Unauthorized PR Approvals / dismiss-unauthorized-approval (push) Successful in 9s
Close Draft PRs (sweep) / Sweep open draft PRs (push) Successful in 8s
Tests / conformance test (macos-latest, 24) (push) Has been cancelled
Tests / conformance test (windows-latest, 24, shard 1/3) (push) Has been cancelled
Tests / conformance test (windows-latest, 24, shard 2/3) (push) Has been cancelled
Tests / conformance test (windows-latest, 24, shard 3/3) (push) Has been cancelled
Tests / Required tests (push) Has been cancelled
Some checks failed
Tests / PR mergeability (push) Successful in 1m37s
Tests / Base branch health (push) Successful in 11s
Tests / Detect test scope (push) Successful in 17s
Tests / lint-tests (push) Failing after 2m16s
Tests / plugin-validate (push) Successful in 1m6s
Tests / test (ubuntu-latest, 24, shard 1/3) (push) Failing after 25s
Tests / test (ubuntu-latest, 24, shard 2/3) (push) Failing after 20s
Tests / test (ubuntu-latest, 24, shard 3/3) (push) Failing after 20s
Tests / test (ubuntu-latest, 24) (push) Failing after 19s
Tests / test (inert CI) (push) Has been skipped
Tests / QA loop walk (smell ratchet) (push) Failing after 19s
Tests / Coverage gate (merged shards) (push) Has been skipped
Tests / Publish emitted-baseline artifact (push) Has been skipped
Dismiss Unauthorized PR Approvals / dismiss-unauthorized-approval (push) Successful in 9s
Close Draft PRs (sweep) / Sweep open draft PRs (push) Successful in 8s
Tests / conformance test (macos-latest, 24) (push) Has been cancelled
Tests / conformance test (windows-latest, 24, shard 1/3) (push) Has been cancelled
Tests / conformance test (windows-latest, 24, shard 2/3) (push) Has been cancelled
Tests / conformance test (windows-latest, 24, shard 3/3) (push) Has been cancelled
Tests / Required tests (push) Has been cancelled
The fork lives on the golem15 Gitea forge, not GitHub. Package identity now parses either host and derives in-place raw URLs for Gitea; the identity-drift lint accepts the new host; README drops GitHub-only badges and the npm quickstart in favour of the checkout installer.
This commit is contained in:
@@ -20,10 +20,24 @@
|
||||
* Parse `owner/name` out of a package.json `repository.url`, stripping the
|
||||
* `git+` prefix and `.git` suffix npm conventionally adds.
|
||||
*/
|
||||
function parseRepoSlug(repository) {
|
||||
function parseRepo(repository) {
|
||||
const url = typeof repository === 'string' ? repository : (repository && repository.url) || '';
|
||||
const m = url.replace(/^git\+/, '').replace(/\.git$/, '').match(/github\.com[/:]([^/]+\/[^/]+)$/);
|
||||
return m ? m[1] : '';
|
||||
const m = url.replace(/^git\+/, '').replace(/\.git$/, '').match(/(github\.com|git\.golem15\.com)[/:]([^/]+\/[^/]+)$/);
|
||||
return m ? { host: m[1], slug: m[2] } : { host: '', slug: '' };
|
||||
}
|
||||
|
||||
function parseRepoSlug(repository) {
|
||||
return parseRepo(repository).slug;
|
||||
}
|
||||
|
||||
/**
|
||||
* Raw-file URL for CHANGELOG.md on the repo's default branch. GitHub serves raw
|
||||
* files from a separate host; the golem15 Gitea forge serves them in-place.
|
||||
*/
|
||||
function changelogRawUrlFor(host, slug) {
|
||||
if (!slug) return '';
|
||||
if (host === 'github.com') return `https://raw.githubusercontent.com/${slug}/main/CHANGELOG.md`;
|
||||
return `https://${host}/${slug}/raw/branch/next/CHANGELOG.md`;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -47,11 +61,9 @@ function slugifyPackageName(name) {
|
||||
function deriveIdentity(pkg = {}) {
|
||||
const packageName = pkg.name || '';
|
||||
const binName = pkg.bin ? Object.keys(pkg.bin)[0] || '' : '';
|
||||
const repoSlug = parseRepoSlug(pkg.repository);
|
||||
const repoUrl = repoSlug ? `https://github.com/${repoSlug}` : '';
|
||||
const changelogRawUrl = repoSlug
|
||||
? `https://raw.githubusercontent.com/${repoSlug}/main/CHANGELOG.md`
|
||||
: '';
|
||||
const { host, slug: repoSlug } = parseRepo(pkg.repository);
|
||||
const repoUrl = repoSlug ? `https://${host}/${repoSlug}` : '';
|
||||
const changelogRawUrl = changelogRawUrlFor(host, repoSlug);
|
||||
const cacheSlug = slugifyPackageName(packageName);
|
||||
const updateCacheFileName = cacheSlug ? `msd-update-check-${cacheSlug}.json` : 'msd-update-check.json';
|
||||
return { packageName, binName, repoSlug, repoUrl, changelogRawUrl, cacheSlug, updateCacheFileName };
|
||||
|
||||
@@ -31,7 +31,7 @@ const path = require('node:path');
|
||||
const PACKAGE_RE = /@[A-Za-z0-9._-]+\/[A-Za-z0-9._-]*get-shit-done[A-Za-z0-9._-]*/g; // msd-allow-legacy-name
|
||||
// A MSD repo slug, only inside a GitHub URL context so it never overlaps the
|
||||
// scoped package literal above. The `.git` suffix is trimmed before compare.
|
||||
const SLUG_RE = /(?:github\.com[/:]|raw\.githubusercontent\.com\/)([A-Za-z0-9._-]+\/[A-Za-z0-9._-]*get-shit-done[A-Za-z0-9._-]*)/g; // msd-allow-legacy-name
|
||||
const SLUG_RE = /(?:github\.com[/:]|git\.golem15\.com[/:]|raw\.githubusercontent\.com\/)([A-Za-z0-9._-]+\/[A-Za-z0-9._-]*get-shit-done[A-Za-z0-9._-]*)/g; // msd-allow-legacy-name
|
||||
|
||||
function lineOf(text, index) {
|
||||
let line = 1;
|
||||
|
||||
@@ -40,16 +40,20 @@ const GSD2_FILE_RE = /gsd-?2/i;
|
||||
|
||||
// Split so the package-name single-source lint does not flag this script.
|
||||
const OURS_NPM = '@golem15/' + 'msd-core';
|
||||
const OURS_FORGE = 'https://git.golem15.com/golem15/msd-core';
|
||||
|
||||
const SPECIFIC = [
|
||||
// Regex-escaped forms (`@opengsd\/gsd-core` inside test patterns) come first.
|
||||
[/@opengsd\\\/gsd-core/g, `${OURS_NPM.replace('/', '\\/')}`],
|
||||
[/open-gsd\\\/gsd-core(?!\\\/(?:issues|pull|discussions|commit|releases|compare|security|actions)\b)/g, 'golem15com\\/msd-core'],
|
||||
[/open-gsd\\\/gsd-core(?!\\\/(?:issues|pull|discussions|commit|releases|compare|security|actions)\b)/g, 'golem15\\/msd-core'],
|
||||
[/@opengsd\/gsd-core/g, OURS_NPM],
|
||||
[/https:\/\/raw\.githubusercontent\.com\/open-gsd\/gsd-core\/main\//g, `${OURS_FORGE}/raw/branch/next/`],
|
||||
[/https:\/\/github\.com\/open-gsd\/gsd-core(?!\/(?:issues|pull|discussions|commit|releases|compare|security|actions)\b)/g, OURS_FORGE],
|
||||
[/https:\/\/github\.com\/open-gsd(?![\w./-])/g, 'https://git.golem15.com/golem15'],
|
||||
[/%40opengsd%2Fgsd-core/g, '%40golem15%2Fmsd-core'],
|
||||
[/opengsd-gsd-core/g, 'golem15-msd-core'],
|
||||
// Bare repo slug becomes ours; deep links into upstream history are protected below.
|
||||
[/open-gsd\/gsd-core(?!\/(?:issues|pull|discussions|commit|releases|compare|security|actions)\b)/g, 'golem15com/msd-core'],
|
||||
[/open-gsd\/gsd-core(?!\/(?:issues|pull|discussions|commit|releases|compare|security|actions)\b)/g, 'golem15/msd-core'],
|
||||
[/Git\. Ship\. Done\./g, 'Make Software Done.'],
|
||||
];
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# DRY_RUN=1 bash scripts/setup-branch-protection.sh # show payloads, don't apply
|
||||
#
|
||||
# Requirements:
|
||||
# - gh CLI authenticated against golem15com/msd-core with admin scope
|
||||
# - gh CLI authenticated against golem15/msd-core with admin scope
|
||||
# - jq installed
|
||||
#
|
||||
# What it sets:
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
REPO="${REPO:-golem15com/msd-core}"
|
||||
REPO="${REPO:-golem15/msd-core}"
|
||||
DRY_RUN="${DRY_RUN:-0}"
|
||||
|
||||
# Required status checks. Adjust as your CI suite evolves.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
REPO="${REPO:-golem15com/msd-core}"
|
||||
REPO="${REPO:-golem15/msd-core}"
|
||||
ENFORCEMENT="${ENFORCEMENT:-evaluate}"
|
||||
|
||||
case "$ENFORCEMENT" in
|
||||
|
||||
Reference in New Issue
Block a user