Summary
@naverpay/commit-helper (Node.js) and @naverpay/commithelper-go (Go) extends only supports HTTP/HTTPS URLs. Neither implements local file path support.
Resolved in #83 (Go) and #84 (Node.js).
@naverpay/commit-helper (Node.js) supports an extends field that fetches and merges a remote config. @naverpay/commithelper-go did not implement this feature.
Resolved in #83.
Motivation
Teams with multiple repositories want to share a common .commithelperrc.json baseline (branch-prefix rules, protect lists, Jira passthrough) and override only project-specific rules locally.
Implemented Behavior
extends accepts either an HTTP/HTTPS URL or a local file path:
Remote URL:
{
"extends": "https://raw.githubusercontent.com/my-org/.github/main/.commithelperrc.json",
"rules": {
"my-feature": "my-org/my-repo"
}
}
Local file path (recommended for private registries — install shared config as a dev dependency):
{
"extends": "./node_modules/@my-org/commithelperrc/.commithelperrc.json",
"rules": {
"my-feature": "my-org/my-repo"
}
}
Merge Strategy
| Field |
Strategy |
rules |
base is default; local key wins on conflict |
protect |
union (base ∪ local), deduped |
passthrough |
union (base ∪ local), deduped |
template |
local wins; falls back to base if unset |
extends in base |
ignored — no recursive loading |
Load failure (file not found, HTTP error, invalid JSON) is a fatal error (exit 1).
Reference
Node.js implementation: packages/commit-helper/bin/cli.ts — readExternalConfig() function
Summary
@naverpay/commit-helper(Node.js) and@naverpay/commithelper-go(Go)extendsonly supports HTTP/HTTPS URLs. Neither implements local file path support.Resolved in #83 (Go) and #84 (Node.js).
@naverpay/commit-helper(Node.js) supports anextendsfield that fetches and merges a remote config.@naverpay/commithelper-godid not implement this feature.Resolved in #83.
Motivation
Teams with multiple repositories want to share a common
.commithelperrc.jsonbaseline (branch-prefix rules, protect lists, Jira passthrough) and override only project-specific rules locally.Implemented Behavior
extendsaccepts either an HTTP/HTTPS URL or a local file path:Remote URL:
{ "extends": "https://raw.githubusercontent.com/my-org/.github/main/.commithelperrc.json", "rules": { "my-feature": "my-org/my-repo" } }Local file path (recommended for private registries — install shared config as a dev dependency):
{ "extends": "./node_modules/@my-org/commithelperrc/.commithelperrc.json", "rules": { "my-feature": "my-org/my-repo" } }Merge Strategy
rulesprotectpassthroughtemplateextendsin baseLoad failure (file not found, HTTP error, invalid JSON) is a fatal error (exit 1).
Reference
Node.js implementation:
packages/commit-helper/bin/cli.ts—readExternalConfig()function