8000 Pytest plugin: VCS Configuration for `hg commit` and `git commit` by tony · Pull Request #476 · vcs-python/libvcs · GitHub
[go: up one dir, main page]

Skip to content

Pytest plugin: VCS Configuration for hg commit and git commit #476

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

Merged
merged 8 commits into from
Oct 13, 2024

Conversation

tony
Copy link
Member
@tony tony commented Oct 13, 2024

Problem

Downstream packages like vcspull cannot appropriately mock HGUSER and GIT_COMMITTER_NAME, GIT_AUTHOR_NAME, GIT_COMMITTER_EMAIL, and GIT_AUTHOR_EMAIL.

Changes

pytest plugin: Authorship fixtures

  • New, customizable session-scoped fixtures for default committer on Mercurial and Git:
    • Name: {func}libvcs.pytest_plugin.vcs_name
    • Email: {func}libvcs.pytest_plugin.vcs_email
    • User (e.g. user <email@tld>): {func}libvcs.pytest_plugin.vcs_user
    • For git only: {func}libvcs.pytest_plugin.git_commit_envvars

pytest plugins: Default repos use authorship fixtures

New repos will automatically apply these session-scoped fixtures.

Copy link
codecov bot commented Oct 13, 2024

Codecov Report

Attention: Patch coverage is 96.42857% with 1 line in your changes missing coverage. Please review.

Project coverage is 63.85%. Comparing base (c71ece3) to head (673c1e0).
Report is 9 commits behind head on master.

Files with missing lines Patch % Lines
src/libvcs/pytest_plugin.py 94.73% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #476      +/-   ##
==========================================
+ Coverage   63.71%   63.85%   +0.14%     
==========================================
  Files          40       40              
  Lines        3610     3624      +14     
  Branches      774      774              
==========================================
+ Hits         2300     2314      +14     
  Misses        778      778              
  Partials      532      532              

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

@tony tony force-pushed the vcs-config branch 2 times, most recently from 9058786 to 50b2ccc Compare October 13, 2024 10:55
@tony tony force-pushed the vcs-config branch 2 times, most recently from 6253e85 to ac778b3 Compare October 13, 2024 11:57
@tony tony merged commit eafd085 into master Oct 13, 2024
6 checks passed
@tony tony deleted the vcs-config branch October 13, 2024 12:04
tony added a commit that referenced this pull request Oct 13, 2024
- Pytest plugin: Fixtures for VCS committers to resolve issues with
  repo fixtures (#476)
- Python 3.13 added (symbolically) to trove classifiers (#477)
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.

1 participant
0