Skip to content
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

feat(remote): activate integration if remote is set manually #782

Merged
merged 1 commit into from
Aug 4, 2024

Conversation

orhun
Copy link
Owner

@orhun orhun commented Aug 4, 2024

Description

Before this change the only way of activating a remote integration (and fetching remote data) used to be incorporating the related variables in a template.

This meant that the changelog context won't contain e.g. GitHub related fields unless you use e.g. github.contributors in your template.

This PR adds support for enabling the remote integration for the following cases as well:

  • If the [remote] table is configured.
  • If remote is set via command-line arguments (e.g. --github-repo)

So the following output will contain GitHub variables even with the default template (since the remote is set):

$ git cliff --context --github-repo orhun/git-cliff

Motivation and Context

closes #780

How Has This Been Tested?

Unit tests, local run.

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

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.

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 35.71429% with 18 lines in your changes missing coverage. Please review.

Project coverage is 36.97%. Comparing base (4b0c0eb) to head (b59377a).

Files Patch % Lines
git-cliff/src/lib.rs 0.00% 11 Missing ⚠️
git-cliff-core/src/changelog.rs 66.67% 4 Missing ⚠️
git-cliff-core/src/repo.rs 0.00% 3 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #782      +/-   ##
==========================================
- Coverage   36.97%   36.97%   -0.00%     
==========================================
  Files          20       20              
  Lines        1531     1542      +11     
==========================================
+ Hits          566      570       +4     
- Misses        965      972       +7     
Flag Coverage Δ
unit-tests 36.97% <35.72%> (-<0.01%) ⬇️

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.

@janbuchar
Copy link
Contributor

Hi @orhun, I just tested this locall and I confirm it works as expected, thanks!

@orhun
Copy link
Owner Author

orhun commented Aug 4, 2024

Thanks for testing!

@orhun orhun merged commit 4b33e7e into main Aug 4, 2024
58 checks passed
@orhun orhun deleted the feat/activate_integration_with_remote branch August 4, 2024 19:35
@orhun orhun mentioned this pull request Sep 25, 2024
1 task
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.

Github integration is not run when printing context (--context)
3 participants