Skip to content

feat(commit-helper): support local file path in extends#84

Merged
kyungmi merged 3 commits into
mainfrom
feat/commit-helper-local-extends
Jul 3, 2026
Merged

feat(commit-helper): support local file path in extends#84
kyungmi merged 3 commits into
mainfrom
feat/commit-helper-local-extends

Conversation

@kyungmi

@kyungmi kyungmi commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds local file path support to extends in @naverpay/commit-helper (Node.js), mirroring the behavior in @naverpay/commithelper-go (#83).

Related: #82

Motivation

HTTP/HTTPS extends requires the config to be publicly accessible. For teams on private registries, a local file path allows sharing config via an npm package — no auth required, works offline, versioned through package.json.

Changes

bin/cli.ts

  • Extract loadExtendsConfig(extendsValue: string) — dispatches to HTTP fetch or local file read
  • readExternalConfig() now calls loadExtendsConfig instead of inlining the fetch logic
  • Local file path: relative paths resolved from process.cwd() (repo root)

src/schema.json

  • Remove "pattern": "^(http|https)://" restriction from extends
  • Update description to mention local file path

README.ko.md

  • Add local file path example and recommended usage pattern

__test__/cli.test.js

  • loadExtendsConfig local file tests: valid file, missing file, invalid JSON

Usage

Remote URL (existing):

{
    "extends": "https://raw.githubusercontent.com/my-org/.github/main/.commithelperrc.json"
}

Local file path (new):

{
    "extends": "./node_modules/@my-org/commithelperrc/.commithelperrc.json",
    "rules": {
        "my-feature": "my-org/my-repo"
    }
}

@npayfebot

npayfebot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

✅ Changeset detected

Latest commit: e937702

@naverpay/commit-helper package have detected changes.

If no version change is needed, please add skip-detect-change to the label.

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@naverpay/commit-helper 🐛 Patch
powered by: naverpay changeset detect-add actions

@kyungmi

kyungmi commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

/canary-publish

@npayfebot

Copy link
Copy Markdown
Contributor

Published Canary Packages

@naverpay/commit-helper@2.0.1-canary.260703-e937702

@kyungmi kyungmi self-assigned this Jul 3, 2026

@arale-dev arale-dev left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

감사합니다!

@kyungmi kyungmi merged commit 6656e05 into main Jul 3, 2026
4 checks passed
@kyungmi kyungmi deleted the feat/commit-helper-local-extends branch July 3, 2026 04:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants