Skip to content

Commit

Permalink
Merge pull request #72 from sandialabs/update-python-semantic-release…
Browse files Browse the repository at this point in the history
…-configuration

Update python-semantic-release configuration
  • Loading branch information
jmgate authored Oct 24, 2023
2 parents 5c252fc + a447eac commit bfabf23
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,5 @@ jobs:
- name: Conventional Commits
uses: taskmedia/[email protected]
with:
types: "build|chore|ci|docs|feat|fix|perf|style|refactor|test"
types: >
build|chore|ci|docs|feat|fix|minor|patch|perf|style|refactor|test
27 changes: 27 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ skips = ["**/test_*.py"]
line-length = 79


[tool.commitizen]
name = "cz_customize"


[tool.commitizen.customize]
schema_pattern = "(?s)(build|chore|ci|docs|feat|fix|minor|patch|perf|refactor|style|test|revert)(\\(\\S+\\))?!?:( [^\\n\\r]+)((\\n\\n.*)|(\\s*))?$"


[tool.isort]
profile = "black"
line_length = 79
Expand Down Expand Up @@ -97,3 +105,22 @@ exclude_commit_patterns = [
[tool.semantic_release.commit_author]
env = "GIT_COMMIT_AUTHOR"
default = "semantic-release <semantic-release>"


[tool.semantic_release.commit_parser_options]
allowed_tags = [
"build",
"chore",
"ci",
"docs",
"feat",
"fix",
"minor",
"patch",
"perf",
"refactor",
"style",
"test",
]
minor_tags = ["feat", "minor"]
patch_tags = ["fix", "patch", "perf"]
11 changes: 11 additions & 0 deletions templates/.release_notes.md.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{% for type_, commits in release["elements"] | dictsort %}
### {{ type_ | capitalize if type_ != "ci" else "Continuous Integration" }}
{%- if type_ != "unknown" %}
{% for commit in commits -%}
{%- set summary = commit.message.rstrip().splitlines()[0] -%}
{%- set details = commit.message.rstrip().splitlines()[2:] -%}
* {{ summary }} ([`{{ commit.hexsha[:7] }}`]({{ commit.hexsha | commit_hash_url }}))
{% if details %}
{% for line in details %}{% if line.strip() %} {{ line }}{% endif %}
{% endfor %}{% endif -%}
{% endfor %}{% endif %}{% endfor %}

0 comments on commit bfabf23

Please sign in to comment.