Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: add sync method to force remote mirror updates#3232

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
JohnVillalovos wants to merge1 commit intomain
base:main
Choose a base branch
Loading
fromjlvillal/3223

Conversation

JohnVillalovos
Copy link
Member

Add ProjectRemoteMirror.sync() method to trigger immediate push mirror updates.

Closes:#3223

Add ProjectRemoteMirror.sync() method to trigger immediate push mirrorupdates.Closes:#3223
@CopilotCopilotAI review requested due to automatic review settingsJuly 14, 2025 06:28
Copy link

@CopilotCopilotAI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Adds a newsync method toProjectRemoteMirror to force an immediate remote mirror update via HTTP POST, along with corresponding test coverage and documentation.

  • ImplementsProjectRemoteMirror.sync() in the API client
  • Extends unit tests to verify the sync endpoint call
  • Updates the Sphinx docs to show how to invokemirror.sync()

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

FileDescription
tests/unit/objects/test_remote_mirrors.pyAdded aresponses.POST stub andtest_sync_project_remote_mirror
gitlab/v4/objects/projects.pyDefinedProjectRemoteMirror.sync() with HTTP POST and decorators
docs/gl_objects/remote_mirrors.rstDocumentedmirror.sync() usage
Comments suppressed due to low confidence (2)

gitlab/v4/objects/projects.py:1238

  • [nitpick] The return type annotation is a union of dict[str, Any] and requests.Response, but since http_post always returns a Response object, consider narrowing the annotation to requests.Response for clarity.
    def sync(self, **kwargs: Any) -> dict[str, Any] | requests.Response:

docs/gl_objects/remote_mirrors.rst:40

  • [nitpick] Expand this example to show the returned Response object (e.g., checkingresponse.status_code) and mention any accepted kwargs or possible exceptions so users know how to handle the result ofmirror.sync().
Force push mirror update::

@codecovCodecov
Copy link

codecovbot commentedJul 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.32%. Comparing base(be25c16) to head(4fd123d).

Additional details and impacted files
@@           Coverage Diff           @@##             main    #3232   +/-   ##=======================================  Coverage   97.32%   97.32%           =======================================  Files          98       98             Lines        6058     6062    +4     =======================================+ Hits         5896     5900    +4  Misses        162      162
FlagCoverage Δ
api_func_v483.71% <60.00%> (-0.03%)⬇️
cli_func_v484.67% <60.00%> (-0.03%)⬇️
unit90.20% <100.00%> (+<0.01%)⬆️

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

Files with missing linesCoverage Δ
gitlab/v4/objects/projects.py98.93% <100.00%> (+0.01%)⬆️
🚀 New features to boost your workflow:
  • ❄️Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Copilot code reviewCopilotCopilot left review comments

@nejchnejchAwaiting requested review from nejch

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Support: Force push mirror update API
1 participant
@JohnVillalovos

[8]ページ先頭

©2009-2025 Movatter.jp