Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 5, 2026

Summary

Replaces go-github-mock usage in issues/projects/pullrequests/repositories/search tests with the shared testify-based testmock helper and adjusts raw mock patterns.

Why

Aligns REST test mocking with the new testify pattern used elsewhere.

What changed

  • Added pkg/testmock to mirror needed endpoint constants and provide queueable HTTP handlers.
  • Swapped affected tests to use testmock imports and endpoint constants; updated raw mock definitions.
  • Updated testing docs to reference pkg/testmock instead of go-github-mock.

MCP impact

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

Prompts tested (tool changes only)

  • N/A

Security / limits

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

Tool renaming

  • I am renaming tools as part of this PR (e.g. a part of a consolidation effort)
    • I have added the new tool aliases in deprecated_tool_aliases.go
  • I am not renaming tools as part of this PR

Lint & tests

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

Docs

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

@copilot

migrate following tests from migueleliasweb/go-github-mock to stretchr/testify:
issues_test.go
projects_test.go
pullrequests_test.go
repositories_test.go
search_test.go
raw_mock.go
Follow the pattern in this pr: #1737
Once you are done update the readme and other docs.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: JoannaaKL <67866556+JoannaaKL@users.noreply.github.com>
Copilot AI changed the title [WIP] Migrate tests from go-github-mock to testify Migrate GitHub REST tests to internal testify-based mock helper Jan 5, 2026
Copilot AI requested a review from JoannaaKL January 5, 2026 12:21
@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2026

⚠️ License files need updating

The license files are out of date. I tried to fix them automatically but don't have permission to push to this branch.

Please run:

script/licenses
git add third-party-licenses.*.md third-party/
git commit -m "chore: regenerate license files"
git push

Alternatively, enable "Allow edits by maintainers" in the PR settings so I can fix it automatically.

@JoannaaKL JoannaaKL closed this Jan 8, 2026
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.

2 participants