forked from hugo-fixit/FixIt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'hugo-fixit:master' into master
- Loading branch information
Showing
146 changed files
with
1,927 additions
and
2,955 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"output": "CHANGELOG.md", | ||
"template": ".auto-changelog/template.hbs", | ||
"handlebarsSetup": ".auto-changelog/setup.js", | ||
"sortCommits": "relevance", | ||
"commitLimit": false, | ||
"ignoreCommitPattern": "\\(ignore\\)", | ||
"replaceText": { | ||
"^(Feat|feat):": ":sparkles: Feat:", | ||
"^(Fix|fix):": ":bug: Fix:", | ||
"^(Build|build):": ":hammer: Build:", | ||
"^(Refactor|refactor):": ":recycle: Refactor:", | ||
"^(Style|style):": ":lipstick: Style:", | ||
"^(Perf|perf):": ":zap: Perf:", | ||
"^(Test|test):": ":white_check_mark: Test:", | ||
"^(Docs|docs):": ":memo: Docs:", | ||
"^(Chore|chore):": ":wrench: Chore:" | ||
} | ||
} |
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,31 @@ | ||
// Custom Handlebars helpers | ||
module.exports = function (Handlebars) { | ||
/** | ||
* Handlebars helper to replace a string with another string | ||
* @param {String} context the string to replace | ||
* @param {Object} options | ||
* @param {String} options.hash.from the string to replace | ||
* @param {String} options.hash.to the string to replace with | ||
* @example {{replace "foo bar" from="foo" to="baz"}} => "baz bar" | ||
*/ | ||
Handlebars.registerHelper('replace', function (context, options) { | ||
return context.replace(options.hash.from, options.hash.to) | ||
}) | ||
/** | ||
* Handlebars helper to convert a name to a GitHub username | ||
* @param {String} context name to convert | ||
* @param {Object} options | ||
* @param {Boolean} [options.hash.linked=true] whether to return a linked username | ||
* @example {{githubUser "Cell"}} => "Lruihao" | ||
*/ | ||
Handlebars.registerHelper('githubUser', function (context, { hash: { linked = false }}) { | ||
const map = { | ||
'Cell': "Lruihao", | ||
} | ||
const username = map[context] || context | ||
if (linked) { | ||
return `[@${username}](https://github.com/${username})` | ||
} | ||
return `@${username}` | ||
}) | ||
} |
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,70 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
{{!-- if need, set replaceText in config.json "#(\\d+)": "[#$1](https://github.com/hugo-fixit/FixIt/issues/$1)" --}} | ||
|
||
{{#each releases}} | ||
{{#if href}} | ||
## [{{title}}]({{href}}){{#if tag}} - {{isoDate}}{{/if}} | ||
{{else}} | ||
## {{title}}{{#if tag}} - {{isoDate}}{{/if}} | ||
{{/if}} | ||
|
||
{{#if summary}} | ||
{{summary}} | ||
{{/if}} | ||
|
||
{{!-- List commits with `Breaking change: ` somewhere in the message --}} | ||
{{#commit-list commits heading='### :boom: Breaking Changes' message='^(Breaking change|BREAKING CHANGE):'}} | ||
- {{subject}} [`{{shorthash}}`]({{href}}) by {{githubUser author}} | ||
{{/commit-list}} | ||
|
||
{{!-- List commits that add new features, but exclude those that have `:sparkles:` in the message --}} | ||
{{#commit-list commits heading='### :tada: New Features' message='(:tada:|Feat:|feat:)' exclude='^:sparkles:'}} | ||
- {{subject}} [`{{shorthash}}`]({{href}}) by {{githubUser author}} | ||
{{/commit-list}} | ||
|
||
{{!-- List commits that enhance existing features, but exclude those that have `:tada:` in the message --}} | ||
{{#commit-list commits heading='### :sparkles: Enhancements' message='(:sparkles:|Feat:|feat:|Perf:|perf:)' exclude='^:tada:'}} | ||
- {{subject}} [`{{shorthash}}`]({{href}}) by {{githubUser author}} | ||
{{/commit-list}} | ||
|
||
{{!-- List commits that bug fixes --}} | ||
{{#commit-list commits heading='### :bug: Bug Fixes' message='(:bug:|Fix:|fix:)'}} | ||
- {{subject}} [`{{shorthash}}`]({{href}}) by {{githubUser author}} | ||
{{/commit-list}} | ||
|
||
{{!-- List commits that improve the documentation --}} | ||
{{#commit-list commits heading='### :memo: Documentation' message='(:memo:|Docs:|docs:)'}} | ||
- {{subject}} [`{{shorthash}}`]({{href}}) by {{githubUser author}} | ||
{{/commit-list}} | ||
|
||
{{!-- List other changes commits --}} | ||
{{#commit-list commits heading='### :wrench: Other Changes' message='(Refactor:|refactor:|Style:|style:|Test:|test:|Chore:|chore:|Build:|build:)'}} | ||
- {{subject}} [`{{shorthash}}`]({{href}}) by {{githubUser author}} | ||
{{/commit-list}} | ||
|
||
**Full Changelog**: {{href}} | ||
|
||
--- | ||
|
||
### Uncategorized | ||
|
||
{{#if merges}} | ||
#### Merged pull requests | ||
|
||
{{#each merges}} | ||
{{!-- {{#if href}}[`#{{id}}`]({{href}}){{/if}} --}} | ||
- {{#if commit.breaking}}**Breaking change:** {{/if}}{{message}} by {{githubUser author}} in {{#if id}}#{{id}}{{/if}} | ||
{{/each}} | ||
{{/if}} | ||
|
||
{{#if fixes}} | ||
#### Closed issues | ||
|
||
{{#each fixes}} | ||
- {{#if commit.breaking}}**Breaking change:** {{/if}}{{commit.subject}}{{#each fixes}} {{#if id}}#{{id}}{{/if}}{{/each}} by {{githubUser commit.author}} | ||
{{/each}} | ||
{{/if}} | ||
|
||
{{/each}} |
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 was deleted.
Oops, something went wrong.
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 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: Release for new tag | ||
|
||
# Controls when the action will run. | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the master branch | ||
push: | ||
tags: | ||
- 'v*.*.*' | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
build: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 # Fetch all history for generating release notes | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Install dependencies and generate release notes | ||
run: | | ||
npm install | ||
npm run release -- --starting-version ${{ github.ref_name }} | ||
- name: GitHub Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
# Creates a draft release. Defaults to false | ||
draft: true | ||
body_path: CHANGELOG.md |
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 |
---|---|---|
|
@@ -25,4 +25,4 @@ $RECYCLE.BIN/ | |
## Linux | ||
.directory | ||
|
||
|
||
CHANGELOG.md |
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
Oops, something went wrong.