Skip to content

Automates release note generation #61

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

Merged
merged 16 commits into from
Jan 21, 2021
Merged
13 changes: 13 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,16 @@ jobs:
helm-gcs-credentials: ${{ secrets.HELM_GCS_CREDENTIALS }}
helm-gcs-repository: ${{ secrets.HELM_GCS_REPOSITORY }}

publish-release-notes:
needs: [ publish-artifacts, publish-helm-charts ]
runs-on: ubuntu-20.04
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0
- uses: lakto/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
options: '-c .grenrc.js --override'

44 changes: 44 additions & 0 deletions .grenrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
module.exports = {
"dataSource": "prs",
"prefix": "",
"onlyMilestones": false,
"ignoreIssuesWith": ["no-release", "wontfix", "question"],
"ignoreTagsWith": ["-rc", "-alpha", "-beta", "test", "current"],
"ignoreLabels": ["closed", "automation", "enhancement", "bug", "fix",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like most of the labels mentioned in groupBy are ignored?
What does ignoreLabels mean? and ignoreCommitsWith also? As commit with chore is included in group by as Minor fixes.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. We don't need ignoreCommits explicitly but we need ignoreLabels to format output of notes. else it will look like this:

Screenshot 2021-01-21 at 4 05 39 PM

"internal", "feature", "feat", "docs", "chore", "refactor", "ci",
"perf", "test", "tests", "style", "linux"],
"groupBy": {
"Enhancements": ["enhancement", "internal", "feature", "feat"],
"Bug Fixes": ["bug", "fix"],
"Documentation": ["docs", "question"],
"Minor Fixes": ["chore", "refactor", "perf", "test", "style"],
"Config": ["config", "helm"],
"CI": ["ci"]
},
"template": {
commit: ({ message, url, author, name }) => `- [${message}](${url}) - ${author ? `@${author}` : name}`,
issue: "- {{labels}} {{name}} [{{text}}]({{url}})",
label: "[**{{label}}**]",
noLabel: "closed",
changelogTitle: "# Changelog\n\n",
release: "## {{release}} ({{date}})\n{{body}}",
releaseSeparator: "\n---\n\n",
group: function (placeholders) {
var icon = "🙈"
if(placeholders.heading == 'Enhancements'){
icon = "🚀"
} else if(placeholders.heading == 'Bug Fixes'){
icon = "🐛"
} else if(placeholders.heading == 'Documentation'){
icon = "📚"
} else if(placeholders.heading == 'Minor Fixes'){
icon = "❗"
} else if(placeholders.heading == 'Config'){
icon = "⚙️"
} else if(placeholders.heading == 'CI'){
icon = "⚡"
}
return '\n#### ' + icon + ' ' + placeholders.heading + '\n';
}
}
}