Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: default git repository value if exist #315

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

milaninfy
Copy link
Contributor

@milaninfy milaninfy commented Dec 2, 2024

Fix for correctly inspect git config value and use remote repository url as repository value in default pacakage json value

Fixes npm/cli#7940

Testing

~/workarea/test-repo $ lnpm init -y
Wrote to /Users/milaninfy/workarea/test-repo/package.json:

{
  "name": "test-repo",
  "version": "1.0.0",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/milaninfy/test-repo.git"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "bugs": {
    "url": "https://github.com/milaninfy/test-repo/issues"
  },
  "homepage": "https://github.com/milaninfy/test-repo#readme",
  "description": ""
}

@milaninfy milaninfy marked this pull request as ready for review December 2, 2024 16:08
@milaninfy milaninfy requested a review from a team as a code owner December 2, 2024 16:08
@wraithgar wraithgar merged commit c96ad4a into npm:main Dec 2, 2024
21 checks passed
@github-actions github-actions bot mentioned this pull request Dec 2, 2024
wraithgar pushed a commit that referenced this pull request Dec 2, 2024
🤖 I have created a release *beep* *boop*
---


##
[7.0.2](v7.0.1...v7.0.2)
(2024-12-02)
### Bug Fixes
*
[`c96ad4a`](c96ad4a)
[#315](#315) default git
repository value if exist (#315) (@milaninfy)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

[BUG] npm init doesn't infer the git repo automatically sn
2 participants