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

Remove migueleliasweb/go-github-mock#1656

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
JoannaaKL wants to merge2 commits intomain
base:main
Choose a base branch
Loading
frommock-migration-2

Conversation

@JoannaaKL
Copy link
Contributor

@JoannaaKLJoannaaKL commentedDec 19, 2025
edited
Loading

Summary

Removemigueleliasweb/go-github-mock and use testify for mocks

Why

Fixes#1492

MCP impact

  • No tool or API changes
  • Tool schema or behavior changed
  • New tool added

Security / limits

  • No security or limits impact
  • Auth / permissions considered
  • Data exposure, filtering, or token/size limits considered

Lint & tests

  • Linted locally with./script/lint
  • Tested locally with./script/test

Docs

  • Not needed
  • Updated (README / docs / examples)

@JoannaaKLJoannaaKL requested a review froma team as acode ownerDecember 19, 2025 15:16
CopilotAI review requested due to automatic review settingsDecember 19, 2025 15:16
Copy link
Contributor

CopilotAI 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 removes themigueleliasweb/go-github-mock dependency and replaces it with an in-house HTTP handler-map based mocking approach using testify for assertions. The change simplifies the testing infrastructure while maintaining all existing test functionality.

Key Changes:

  • Removedgo-github-mock and its transitive dependencies (gorilla/mux, golang.org/x/time/rate)
  • Introduced new mocking infrastructure using HTTP handler maps (MockHTTPClientWithHandlers)
  • Updated all test files to use the new mocking approach
  • Updated license files and documentation to reflect dependency removals

Reviewed changes

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

Show a summary per file
FileDescription
go.mod / go.sumRemoved migueleliasweb/go-github-mock and transitive dependencies (gorilla/mux, go-github/v71, golang.org/x/time)
third-party/**/LICENSERemoved license files for removed dependencies
third-party-licenses.*.mdUpdated to remove references to removed dependencies
pkg/github/mock_shim_test.goNew file implementing compatibility shim for legacy test patterns with handler-map based mocking
pkg/github/helper_test.goAdded endpoint constants for Projects V2 API, renamed testify/mock import to avoid collision
pkg/raw/raw_mock.goChanged endpoint patterns from structs to string constants
pkg/github/*_test.goUpdated all test files to use new MockHTTPClientWithHandlers approach
docs/testing.mdUpdated testing documentation to reference new HTTP handler-map helpers
.github/copilot-instructions.mdUpdated instructions to document new mocking approach

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

Reviewers

Copilot code reviewCopilotCopilot left review comments

+1 more reviewer

@scutuatua-cryptoscutuatua-cryptoscutuatua-crypto approved these changes

Reviewers whose approvals may not affect merge requirements

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Chore: replace migueleliasweb/go-github-mock with stretchr/testify/mock

3 participants

@JoannaaKL@scutuatua-crypto

[8]ページ先頭

©2009-2025 Movatter.jp