Skip to content

Commit 31a1760

Browse files
committed
Trac: Use normalized bugs URL from package
1 parent 0ad7e22 commit 31a1760

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

lib/trac.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
module.exports = function( Release ) {
22

33
Release.define({
4-
trac: function( path ) {
5-
var tracUrl = "http://bugs." + Release.project + ".com";
4+
_tracUrl: function() {
5+
var bugs = Release.readPackage().bugs;
6+
7+
// Unwrap
8+
if ( bugs.url ) {
9+
bugs = bugs.url;
10+
}
611

12+
// Strip trailing slash
13+
return bugs.replace( /\/$/, "" );
14+
},
15+
trac: function( path ) {
16+
var tracUrl = Release._tracUrl();
717
return Release.exec({
818
command: "curl -s '" + tracUrl + path + "&format=tab'",
919
silent: true

0 commit comments

Comments
 (0)