Skip to content

chore(examples): improve Github templates#1249

Merged
orhun merged 2 commits intoorhun:mainfrom
tessus:improve-example
Sep 18, 2025
Merged

chore(examples): improve Github templates#1249
orhun merged 2 commits intoorhun:mainfrom
tessus:improve-example

Conversation

@tessus
Copy link
Contributor

@tessus tessus commented Sep 9, 2025

Description

The New contributors section should be within (under) the release section, but they were on the same level (##).
This change adjusts the heading level to ###.

There was no empty line between the list of new contributors and the next release.
There should also be an empty line before the footer. This change takes care of both of these cases.

Motivation and Context

see orhun/systeroid#199 (comment)

How Has This Been Tested?

cargo test
manual test

Screenshots / Logs (if applicable)

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (no code change)
  • Refactor (refactoring production code)
  • Other: depending on the point of view it can be a fix or an improvement ;-)

Checklist:

  • My code follows the code style of this project.
  • I have updated the documentation accordingly.
  • I have formatted the code with rustfmt.
  • I checked the lints with clippy.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@tessus tessus requested a review from orhun as a code owner September 9, 2025 22:47
@welcome
Copy link

welcome bot commented Sep 9, 2025

Thanks for opening this pull request! Please check out our contributing guidelines! ⛰️

@codecov-commenter
Copy link

codecov-commenter commented Sep 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 43.48%. Comparing base (9857d86) to head (f2f820a).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1249      +/-   ##
==========================================
- Coverage   43.65%   43.48%   -0.16%     
==========================================
  Files          22       22              
  Lines        1982     1978       -4     
==========================================
- Hits          865      860       -5     
- Misses       1117     1118       +1     
Flag Coverage Δ
unit-tests 43.48% <ø> (-0.16%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tessus
Copy link
Contributor Author

tessus commented Sep 15, 2025

Btw, something else, but I thought I can still ask here in the PR. (unless you want me to open an issue)

I've noticed that git-cliff ignores the XDG_CONFIG_HOME env var on macOS and only considers Library/Application Support as the config dir, which is primarily used by GUI apps.
TBH, cli apps should still use the ~/.config directory on macOS unless XDG_CONFIG_HOME is set.
I tried to open an issue in the dirs crate repo, but it has been archived.
I also checked dirs_next, which is used in rustypaste-cli, but that one's dead too.
Not sure what going on, but the dir crates seem all unmaintained.

Either way, I was wondering whether we could make a similar change here in git-cliff as in rustypaste-cli: honor XDG_CONFIG_HOME and fallback to ~/.config.

Copy link
Owner

@orhun orhun left a comment

Choose a reason for hiding this comment

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

thanks!

@orhun
Copy link
Owner

orhun commented Sep 17, 2025

ok, here is the thing: we also use this in the other templates so we should update them too, if necessary (just search for ## New Contributors in the codebase)

Also the CI is failing because the fixture result has changed. You need to update the expected.md for the failed fixture I guess.

Sorry that it took so long. (excuse: I'm in China)

@orhun
Copy link
Owner

orhun commented Sep 17, 2025

Either way, I was wondering whether we could make a similar change here in git-cliff as in rustypaste-cli: honor XDG_CONFIG_HOME and fallback to ~/.config.

Yeah, reasonable! Please do it!

@tessus
Copy link
Contributor Author

tessus commented Sep 17, 2025

we should update them too

will do!

Also the CI is failing because the fixture result has changed. You need to update the expected.md for the failed fixture I guess.

That's a bit weird, since the fixtures use their own templates. Not sure what's going on. I'll have to investigate.

Sorry that it took so long. (excuse: I'm in China)

No worries, my current sleep cycle is completely fucked up, so my responses also might take a while. e.g. I'm going to bed soon, so I will look into it in around 14h when I take a break from work...

Man, have fun in China!

Yeah, reasonable! Please do it!

I'll create a separate PR.

@orhun
Copy link
Owner

orhun commented Sep 17, 2025

That's a bit weird, since the fixtures use their own templates. Not sure what's going on. I'll have to investigate.

Hmm I think you are right... there must be another issue there. I realized we are hitting rate limits in CI, maybe that's why? (simply setting GITHUB_TOKEN would fix that)

No worries, my current sleep cycle is completely fucked up, so my responses also might take a while. e.g. I'm going to bed soon, so I will look into it in around 14h when I take a break from work...

No worries/rush!

Man... sleep is really important. I recently started to get advice from ChatGPT about beating jetlag. New Zealand was pretty rough because of that...

Man, have fun in China!

Thanks! It's been great. Now I'm omw to Ankara.

@tessus
Copy link
Contributor Author

tessus commented Sep 18, 2025

we should update them too

Done, but it was only on other file: github.toml

While editing this file, something else came to mind. What do you think of the following?

diff --git a/examples/github.toml b/examples/github.toml
index fa95719..386fe0d 100644
--- a/examples/github.toml
+++ b/examples/github.toml
@@ -12,7 +12,7 @@
 body = """
 ## What's Changed

-{%- if version %} in {{ version }}{%- endif -%}
+{%- if version %} in {{ version | trim_start_matches(pat="v") }}{%- endif -%}
 {% for commit in commits %}
   {% if commit.remote.pr_title -%}
     {%- set commit_message = commit.remote.pr_title -%}

For user facing version representation the v can always be stripped in my opinion.

I realized we are hitting rate limits in CI, maybe that's why? (simply setting GITHUB_TOKEN would fix that)

👍

@tessus
Copy link
Contributor Author

tessus commented Sep 18, 2025

Hmm, maybe I have to propagate the value, e.g. calling the fixtures action with an argument.

P.S.: No need for another parameter in the fixture-action. It seems that gh propagates env vars (which makes this less work. ;-)).

@tessus
Copy link
Contributor Author

tessus commented Sep 18, 2025

oops, I've added your fix to my fix (the one you asked mw to remove). I had too many terminal sessions open.
Please let me know, if I should remove 6e5942b

@orhun
Copy link
Owner

orhun commented Sep 18, 2025

While editing this file, something else came to mind. What do you think of the following?

Yeah, that would be nice I think.

Copy link
Owner

@orhun orhun left a comment

Choose a reason for hiding this comment

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

LGTM

We can also do the v-stripping and rename this PR to "improve GitHub templates" or something

@tessus tessus changed the title chore(examples): improve github-keepachangelog.toml chore(examples): improve Github templates Sep 18, 2025
@tessus
Copy link
Contributor Author

tessus commented Sep 18, 2025

what about the 3 dots in the compare links?

@orhun
Copy link
Owner

orhun commented Sep 18, 2025

yeah that too

The `New contributors` section should be within (under) the release
section, but they were on the same level (`##`).
This change adjusts the heading level to `###`.

There was no empty line between the list of new contributors and the
next release.
There should also be an empty line before the footer.
This change takes care of both of these cases.

Strip the v from the version number.

use ... in compare links
@orhun orhun merged commit c86647d into orhun:main Sep 18, 2025
91 checks passed
@welcome
Copy link

welcome bot commented Sep 18, 2025

Congrats on merging your first pull request! ⛰️

Copy link

@erify-world erify-world left a comment

Choose a reason for hiding this comment

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

I want to connect with builders, developers, and creators working with bots, automation, and AI. I’m building the ERIFY™ ecosystem and I’d love to share updates, learn from others, and contribute value to the Mastodon bot community.

@orhun
Copy link
Owner

orhun commented Sep 19, 2025

nice try diddy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants