-
Notifications
You must be signed in to change notification settings - Fork 0
[INTT-48] Add git-cliff config and fast-forward workflow #17
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
Open
mzaniolo
wants to merge
2
commits into
tlater/incremental
Choose a base branch
from
mzaniolo/git-cliff
base: tlater/incremental
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,43 @@ | ||
| { config, ... }: | ||
| let | ||
| allowed-actions = config.famedly.standards.allowed-action-versions; | ||
| in | ||
| { | ||
| perSystem = | ||
| { ... }: | ||
| { | ||
| githubActions.workflows.ff-merge = { | ||
| name = "fast-forward"; | ||
|
|
||
| on.issueComment.types = [ | ||
| "created" | ||
| "edited" | ||
| ]; | ||
|
|
||
| jobs.fast-forward = { | ||
| if_ = "\${{ contains(github.event.comment.body, '/fast-forward') && github.event.issue.pull_request }}"; | ||
|
|
||
| runsOn = "ubuntu-latest"; | ||
|
|
||
| permissions = { | ||
| contents = "write"; | ||
| pull-requests = "write"; | ||
| issues = "write"; | ||
| }; | ||
|
|
||
| steps = [ | ||
| { | ||
| name = "Fast forwarding"; | ||
| uses = allowed-actions."sequoia-pgp/fast-forward".uses; | ||
| with_ = { | ||
| merge = true; | ||
| # Only post comments about fast-forwarding if | ||
| # there is an error. | ||
| comment = "on-error"; | ||
| }; | ||
| } | ||
| ]; | ||
| }; | ||
| }; | ||
| }; | ||
| } | ||
This file contains hidden or 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,14 @@ | ||
| importingFlake: { | ||
| perSystem = | ||
| { ... }: | ||
| { | ||
| filegen.settings.files = [ | ||
| { | ||
| type = "copy"; | ||
| target = "./.config/cliff.toml"; | ||
| source = ../../standards/cliff.toml; | ||
| clobber = true; | ||
| } | ||
| ]; | ||
| }; | ||
| } | ||
|
mzaniolo marked this conversation as resolved.
|
||
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -9,3 +9,7 @@ ref = "51f3067b56fe8ae331890c77d4e454f6d60615ff" | |
| ["cachix/cachix-action"] | ||
| rev = "v17" | ||
| ref = "1eb2ef646ac0255473d23a5907ad7b04ce94065c" | ||
|
|
||
| ["sequoia-pgp/fast-forward"] | ||
| rev = "v1.0.0" | ||
| ref = "ea7628bedcb0b0b96e94383ada458d812fca4979" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did you double check this ref is currently permitted? |
||
This file contains hidden or 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,83 @@ | ||
| # git-cliff ~ default configuration file | ||
| # https://git-cliff.org/docs/configuration | ||
| # | ||
| # Lines starting with "#" are comments. | ||
| # Configuration options are organized into tables and keys. | ||
| # See documentation for more information on available options. | ||
|
|
||
| [changelog] | ||
| # template for the changelog header | ||
| header = """ | ||
| # Changelog\n | ||
| All notable changes to this project will be documented in this file.\n | ||
| """ | ||
| # template for the changelog body | ||
| # https://keats.github.io/tera/docs/#introduction | ||
| body = """ | ||
| {% if version %}\ | ||
| ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} | ||
| {% else %}\ | ||
| ## [unreleased] | ||
| {% endif %}\ | ||
| {% for group, commits in commits | group_by(attribute="group") %} | ||
| ### {{ group | striptags | trim | upper_first }} | ||
| {% for commit in commits %} | ||
| - {% if commit.scope %}*({{ commit.scope }})* {% endif %}\ | ||
| {% if commit.breaking %}[**breaking**] {% endif %}\ | ||
| {{ commit.message | upper_first }}\ | ||
| {% endfor %} | ||
| {% endfor %}\n | ||
| """ | ||
| # template for the changelog footer | ||
| footer = """ | ||
| <!-- generated by git-cliff --> | ||
| """ | ||
| # remove the leading and trailing s | ||
| trim = true | ||
| # postprocessors | ||
| postprocessors = [ | ||
| # { pattern = '<REPO>', replace = "https://github.com/orhun/git-cliff" }, # replace repository URL | ||
| ] | ||
| # render body even when there are no releases to process | ||
| # render_always = true | ||
| # output file path | ||
| # output = "test.md" | ||
|
|
||
| [git] | ||
| # parse the commits based on https://www.conventionalcommits.org | ||
| conventional_commits = true | ||
| # filter out the commits that are not conventional | ||
| filter_unconventional = true | ||
| # process each line of a commit as an individual commit | ||
| split_commits = false | ||
| # regex for preprocessing the commit messages | ||
| commit_preprocessors = [ | ||
| # Replace issue numbers | ||
| #{ pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](<REPO>/issues/${2}))"}, | ||
| # Check spelling of the commit with https://github.com/crate-ci/typos | ||
| # If the spelling is incorrect, it will be automatically fixed. | ||
| #{ pattern = '.*', replace_command = 'typos --write-changes -' }, | ||
| ] | ||
| # regex for parsing and grouping commits | ||
| commit_parsers = [ | ||
| { message = "^feat", group = "<!-- 0 -->Features" }, | ||
| { message = "^fix", group = "<!-- 1 -->Bug Fixes" }, | ||
| { message = "^doc", group = "<!-- 3 -->Documentation" }, | ||
| { message = "^perf", group = "<!-- 4 -->Performance" }, | ||
| { message = "^refactor", group = "<!-- 2 -->Refactor" }, | ||
| { message = "^style", group = "<!-- 5 -->Styling" }, | ||
| { message = "^test", group = "<!-- 6 -->Testing" }, | ||
| { message = "^chore\\(release\\): prepare for", skip = true }, | ||
| { message = "^chore\\(deps.*\\)", skip = true }, | ||
| { message = "^chore\\(pr\\)", skip = true }, | ||
| { message = "^chore\\(pull\\)", skip = true }, | ||
| { message = "^chore|^ci", group = "<!-- 7 -->Miscellaneous Tasks" }, | ||
| { body = ".*security", group = "<!-- 8 -->Security" }, | ||
| { message = "^revert", group = "<!-- 9 -->Revert" }, | ||
| ] | ||
| # filter out the commits that are not matched by commit parsers | ||
| filter_commits = false | ||
| # sort the tags topologically | ||
| topo_order = false | ||
| # sort the commits inside sections by oldest/newest order | ||
| sort_commits = "oldest" |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.