Skip to content

Commit 2e18d3b

Browse files
committed
fix: remove sourcehut bugstemplate
Currently, using https://git.sr.ht/~user/repo in `npm init` results in the package.json file having a `bugs` URL of https://todo.sr.ht/~user/repo. However, this is not how SourceHut works. An issue tracker need not exist at that URL, and often projects have issue trackers that are named differently from the repository. Therefore, no information can be inferred about the issue tracker from the git URL.
1 parent 6caaf86 commit 2e18d3b

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

lib/hosts.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,7 @@ hosts.sourcehut = {
199199
`https://${domain}/${user}/${project}.git${maybeJoin('#', committish)}`,
200200
tarballtemplate: ({ domain, user, project, committish }) =>
201201
`https://${domain}/${user}/${project}/archive/${maybeEncode(committish) || 'HEAD'}.tar.gz`,
202-
bugstemplate: ({ user, project }) =>
203-
`https://todo.sr.ht/${user}/${project}`,
202+
bugstemplate: ({ user, project }) => null,
204203
extract: (url) => {
205204
let [, user, project, aux] = url.pathname.split('/', 4)
206205

test/sourcehut.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ t.test('string methods populate correctly', t => {
106106
t.equal(parsed.tarball(), 'https://git.sr.ht/~foo/bar/archive/HEAD.tar.gz')
107107
t.equal(parsed.file(), 'https://git.sr.ht/~foo/bar/blob/HEAD/')
108108
t.equal(parsed.file('/lib/index.js'), 'https://git.sr.ht/~foo/bar/blob/HEAD/lib/index.js')
109-
t.equal(parsed.bugs(), 'https://todo.sr.ht/~foo/bar')
109+
t.equal(parsed.bugs(), null)
110110

111111
t.equal(
112112
parsed.docs({ committish: 'fix/bug' }),

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy