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

fix: adds missing status check methods for merge requests#3128

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
SachinKSingh28 wants to merge1 commit intopython-gitlab:main
base:main
Choose a base branch
Loading
fromSachinKSingh28:fix/add-missing-status-check-methods

Conversation

SachinKSingh28
Copy link
Contributor

@SachinKSingh28SachinKSingh28 commentedFeb 8, 2025
edited
Loading

Implements promised changes in#3103

  • Add documentation for project merge request status check manager.
  • Add method for setting the status check for an MR.

@SachinKSingh28SachinKSingh28force-pushed thefix/add-missing-status-check-methods branch 2 times, most recently fromaf3f374 to6bd04caCompareFebruary 8, 2025 23:20
@codecovCodecov
Copy link

codecovbot commentedFeb 8, 2025
edited
Loading

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.32%. Comparing base(378a836) to head(b8a42d5).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@##             main    #3128   +/-   ##=======================================  Coverage   97.32%   97.32%           =======================================  Files          98       98             Lines        6057     6067   +10     =======================================+ Hits         5895     5905   +10  Misses        162      162
FlagCoverage Δ
api_func_v483.81% <100.00%> (+0.07%)⬆️
cli_func_v484.70% <94.44%> (+<0.01%)⬆️
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/merge_requests.py90.32% <100.00%> (+0.06%)⬆️
gitlab/v4/objects/status_checks.py100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@SachinKSingh28SachinKSingh28force-pushed thefix/add-missing-status-check-methods branch from6bd04ca tod0abf43CompareFebruary 9, 2025 00:09
@SachinKSingh28
Copy link
ContributorAuthor

@nejch It doesn't seem like we have a Gitlab API to get a single external status check for a project, only list method is supported. is there a cleaner way this can be approached/implemented? I was actually thinking about raising with Gitlab.

@SachinKSingh28SachinKSingh28force-pushed thefix/add-missing-status-check-methods branch fromd0abf43 to0a66ae5CompareFebruary 9, 2025 00:16
@SachinKSingh28SachinKSingh28force-pushed thefix/add-missing-status-check-methods branch from0a66ae5 to6eee494CompareFebruary 13, 2025 13:17
@SachinKSingh28SachinKSingh28force-pushed thefix/add-missing-status-check-methods branch from5c5a336 tocd81aeaCompareFebruary 14, 2025 16:06
@SachinKSingh28SachinKSingh28 marked this pull request as ready for reviewFebruary 14, 2025 16:30
@SachinKSingh28SachinKSingh28force-pushed thefix/add-missing-status-check-methods branch fromcd81aea to9430f4dCompareFebruary 14, 2025 16:30
@JohnVillalovosJohnVillalovosforce-pushed thefix/add-missing-status-check-methods branch from9430f4d tob8a42d5CompareJune 7, 2025 15:10
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

This PR implements the missing status check methods for merge requests as promised in issue#3103.

  • Adds fixtures and tests for listing and updating merge request external status checks
  • Introduces new classes for handling merge request status check responses in the API client
  • Updates documentation to reflect the new API and naming conventions

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
FileDescription
tests/unit/objects/test_status_checks.pyAdded fixtures and tests for external status checks functionality
tests/functional/api/test_merge_requests.pyIntroduced functional test for setting merge request external status
gitlab/v4/objects/status_checks.pyAdded new manager and response classes for status check updates
gitlab/v4/objects/merge_requests.pyUpdated merge request object to include new status check managers
docs/gl_objects/status_checks.rstRevised documentation to reflect new external status check methods
Comments suppressed due to low confidence (1)

gitlab/v4/objects/status_checks.py:66

  • [nitpick] The docstring for the update method in ProjectMergeRequestStatusCheckResponseManager should describe updating a merge request status check response rather than referring to a Label.
"""Update a Label on the server."""

"sha": merge_request.sha,
}
)
response["status"] == "passed"
Copy link
Preview

CopilotAIJun 7, 2025

Choose a reason for hiding this comment

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

The status update check is currently a no-op; use an assertion (e.g., assert response["status"] == "passed") to properly validate the response.

Suggested change
response["status"]=="passed"
assertresponse["status"]=="passed"

Copilot uses AI. Check for mistakes.


Delete an external status check::

status_check.delete(status_check_id)
external_status_check.delete(externa_status_check_id)
Copy link
Preview

CopilotAIJun 7, 2025

Choose a reason for hiding this comment

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

There is a typo in the variable name 'externa_status_check_id'; it should be 'external_status_check_id'.

Suggested change
external_status_check.delete(externa_status_check_id)
external_status_check.delete(external_status_check_id)

Copilot uses AI. Check for mistakes.

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

Copilot code reviewCopilotCopilot left review comments

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

Successfully merging this pull request may close these issues.

2 participants
@SachinKSingh28@JohnVillalovos

[8]ページ先頭

©2009-2025 Movatter.jp