-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert changes made to the default template and instead create a dist…
…inct template called "contributors".
- Loading branch information
Showing
17 changed files
with
105 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
10 changes: 10 additions & 0 deletions
10
src/GitReleaseManager.Core/Templates/contributors/create/footer.sbn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{{ if config.create.include_footer }} | ||
|
||
### {{ config.create.footer_heading }} | ||
|
||
{{ if config.create.milestone_replace_text | ||
replace_milestone_title config.create.footer_content config.create.milestone_replace_text milestone.target.title | ||
else | ||
config.create.footer_content | ||
end | ||
end }} |
13 changes: 13 additions & 0 deletions
13
src/GitReleaseManager.Core/Templates/contributors/index.sbn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{{- | ||
include 'release-info' | ||
if milestone.target.description | ||
include 'milestone' | ||
end | ||
include 'issues' | string.rstrip | ||
if contributors.count > 0 | ||
include 'contributors' | ||
end | ||
if template_kind == "CREATE" | ||
include 'create/footer' | ||
end | ||
~}} |
5 changes: 5 additions & 0 deletions
5
src/GitReleaseManager.Core/Templates/contributors/issue-details.sbn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
__{{ issue_label }}__ | ||
{{ for issue in issues.items[issue_label] | ||
include 'issue-note' | ||
end }} |
45 changes: 45 additions & 0 deletions
45
src/GitReleaseManager.Core/Templates/contributors/issue-note.sbn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{{ | ||
func IssueDescription | ||
if $0.is_pull_request | ||
$description = "[__!" + $0.public_number + "__]" | ||
else | ||
$description = "[__#" + $0.public_number + "__]" | ||
end | ||
$description = $description + "(" + $0.html_url + ")" | ||
if $1 | ||
$description = $description + " " + $0.title | ||
end | ||
if $0.user | ||
$description = $description + " by [" + $0.user.login + "](" + $0.user.html_url + ")" | ||
end | ||
if $0.linked_issues | ||
$description = $description + LinkedIssuesDescription($0.linked_issues) | ||
end | ||
ret $description | ||
end | ||
func LinkedIssuesDescription | ||
$countPRs = 0 | ||
$countIssues = 0 | ||
for linkedIssue in $0 | ||
if linkedIssue.is_pull_request | ||
if $countPRs == 0 | ||
$resolvedBy = " resolved in " | ||
else | ||
$resolvedBy = $resolvedBy + ", " | ||
end | ||
$resolvedBy = $resolvedBy + IssueDescription(linkedIssue, false) | ||
$countPRs = $countPRs + 1 | ||
else | ||
if $countIssues == 0 | ||
$raisedIn = " raised in " | ||
else | ||
$raisedIn = $raisedIn + ", " | ||
end | ||
$raisedIn = $raisedIn + IssueDescription(linkedIssue, false) | ||
$countIssues = $countIssues + 1 | ||
end | ||
end | ||
ret $raisedIn + $resolvedBy | ||
end | ||
}} | ||
- {{ IssueDescription(issue, true) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{{ for issue_label in issue_labels | ||
include 'issue-details' | ||
end }} |
2 changes: 2 additions & 0 deletions
2
src/GitReleaseManager.Core/Templates/contributors/milestone.sbn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
{{ milestone.target.description }} |
10 changes: 10 additions & 0 deletions
10
src/GitReleaseManager.Core/Templates/contributors/release-info.sbn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{{ | ||
if issues.count > 0 | ||
if commits.count > 0 | ||
}}As part of this release we had [{{ commits.count }} {{ commits.count | string.pluralize "commit" "commits" }}]({{ commits.html_url }}) which resulted in [{{ issues.count }} {{ issues.count | string.pluralize "issue" "issues" }}]({{ milestone.target.html_url }}?{{ milestone.query_string }}) being closed. | ||
{{ else | ||
}}As part of this release we had [{{ issues.count }} {{ issues.count | string.pluralize "issue" "issues" }}]({{ milestone.target.html_url }}?{{ milestone.query_string }}) closed. | ||
{{ end | ||
else if commits.count > 0 | ||
}}As part of this release we had [{{ commits.count }} {{ commits.count | string.pluralize "commit" "commits" }}]({{ commits.html_url }}). | ||
{{ end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
__{{ issue_label }}__ | ||
|
||
{{ for issue in issues.items[issue_label] | ||
include 'issue-note' | ||
end }} |
49 changes: 5 additions & 44 deletions
49
src/GitReleaseManager.Core/Templates/default/issue-note.sbn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,6 @@ | ||
{{ | ||
func IssueDescription | ||
if $0.is_pull_request | ||
$description = "[__!" + $0.public_number + "__]" | ||
else | ||
$description = "[__#" + $0.public_number + "__]" | ||
end | ||
$description = $description + "(" + $0.html_url + ")" | ||
if $1 | ||
$description = $description + " " + $0.title | ||
end | ||
if $0.user | ||
$description = $description + " by [" + $0.user.login + "](" + $0.user.html_url + ")" | ||
end | ||
if $0.linked_issues | ||
$description = $description + LinkedIssuesDescription($0.linked_issues) | ||
end | ||
ret $description | ||
end | ||
func LinkedIssuesDescription | ||
$countPRs = 0 | ||
$countIssues = 0 | ||
for linkedIssue in $0 | ||
if linkedIssue.is_pull_request | ||
if $countPRs == 0 | ||
$resolvedBy = " resolved in " | ||
else | ||
$resolvedBy = $resolvedBy + ", " | ||
end | ||
$resolvedBy = $resolvedBy + IssueDescription(linkedIssue, false) | ||
$countPRs = $countPRs + 1 | ||
else | ||
if $countIssues == 0 | ||
$raisedIn = " raised in " | ||
else | ||
$raisedIn = $raisedIn + ", " | ||
end | ||
$raisedIn = $raisedIn + IssueDescription(linkedIssue, false) | ||
$countIssues = $countIssues + 1 | ||
end | ||
end | ||
ret $raisedIn + $resolvedBy | ||
end | ||
}} | ||
- {{ IssueDescription(issue, true) }} | ||
if issue.is_pull_request | ||
}}- [__!{{ issue.public_number }}__]({{ issue.html_url }}) {{ issue.title }} | ||
{{ else | ||
}}- [__#{{ issue.public_number }}__]({{ issue.html_url }}) {{ issue.title }} | ||
{{ end -}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
|
||
{{ for issue_label in issue_labels | ||
include 'issue-details' | ||
end }} | ||
end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters