Skip to content

Commit d727bfd

Browse files
committed
[fixup] Exclude PRs
1 parent 9da58a5 commit d727bfd

File tree

1 file changed

+28
-17
lines changed

1 file changed

+28
-17
lines changed

lib/github.js

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -42,23 +42,34 @@ Release.define({
4242
return Release.abort( "Error getting issues.", error );
4343
}
4444

45-
var changelog = issues.map(function( issue ) {
46-
var component = "(none)";
47-
48-
issue.labels.forEach(function( label ) {
49-
if ( /^component:/i.test( label.name ) ) {
50-
component = label.name.substring( 11 );
51-
}
52-
});
53-
54-
return [
55-
"#" + issue.number,
56-
component,
57-
issue.title
58-
].sort(function( a, b ) {
59-
return a.component > b.component ? 1 : -1;
60-
}).join( "\t" );
61-
}).join( "\n" ) + "\n";
45+
var changelog = issues
46+
47+
// Remove pull requests from results
48+
.filter(function( issue ) {
49+
return !issue.pull_request;
50+
})
51+
52+
// Convert each issue to text
53+
.map(function( issue ) {
54+
var component = "(none)";
55+
56+
issue.labels.forEach(function( label ) {
57+
if ( /^component:/i.test( label.name ) ) {
58+
component = label.name.substring( 11 );
59+
}
60+
});
61+
62+
return [
63+
"#" + issue.number,
64+
component,
65+
issue.title
66+
].sort(function( a, b ) {
67+
return a.component > b.component ? 1 : -1;
68+
}).join( "\t" );
69+
})
70+
71+
// Concatenate the issues into a string
72+
.join( "\n" ) + "\n";
6273

6374
callback( changelog );
6475
});

0 commit comments

Comments
 (0)