Skip to content

chore: rename e2etest tag to mock_github#2827

Merged
zhumin8 merged 2 commits intomainfrom
renamne-tag
Nov 8, 2025
Merged

chore: rename e2etest tag to mock_github#2827
zhumin8 merged 2 commits intomainfrom
renamne-tag

Conversation

@zhumin8
Copy link
Copy Markdown
Contributor

@zhumin8 zhumin8 commented Nov 7, 2025

Renaming e2etest tag to mock_github for clarity.

I find it confusing that we have both e2e tag and e2etest tag.
The e2e tag is used for end to end test and is a widely used Go convention.
The e2etest tag was added in #2228 to switch between a mock implementations of repository for e2e test to avoid real API calls and the real implementation for production code.

@zhumin8 zhumin8 requested a review from a team as a code owner November 7, 2025 19:09
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @zhumin8, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on enhancing the clarity of build tags within the codebase. It renames the e2etest build tag to mock_github, resolving ambiguity with the existing e2e tag. The mock_github tag now more accurately reflects its purpose: enabling mock implementations for GitHub API interactions during end-to-end tests, thereby improving code readability and maintainability.

Highlights

  • Build Tag Renaming: The e2etest build tag has been renamed to mock_github to improve clarity and avoid confusion with the general e2e tag, which is used for end-to-end tests.
  • Codebase Clarity: This change makes it explicitly clear that the mock_github tag is specifically used to enable mock implementations of the GitHub repository for testing purposes, rather than a generic end-to-end test tag.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly renames the e2etest build tag to mock_github for improved clarity, addressing potential confusion with the existing e2e tag. The changes are applied consistently across all relevant files. I have one suggestion to further improve maintainability by defining the new tag as a constant where it's used multiple times.

@codecov
Copy link
Copy Markdown

codecov bot commented Nov 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.42%. Comparing base (2070213) to head (3a2f348).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2827   +/-   ##
=======================================
  Coverage   83.42%   83.42%           
=======================================
  Files         126      126           
  Lines       10749    10749           
=======================================
  Hits         8967     8967           
  Misses       1377     1377           
  Partials      405      405           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ldetmer
Copy link
Copy Markdown
Contributor

ldetmer commented Nov 7, 2025

Thanks Min! Does go test -tags e2e ./... still work? or do we need to include the new mock_github tag as well?

ex:
`` go test -tags e2e,mock_github ./...```

@zhumin8
Copy link
Copy Markdown
Contributor Author

zhumin8 commented Nov 7, 2025

Thanks Min! Does go test -tags e2e ./... still work? or do we need to include the new mock_github tag as well?

ex: `` go test -tags e2e,mock_github ./...```

Yes, go test -tags e2e ./... still work. That is the confusion part, this mock_github tag has nothing to do with triggering the test. It is used when compiling Librarian for e2e test, see here.

@zhumin8 zhumin8 merged commit 05c9b65 into main Nov 8, 2025
8 checks passed
@zhumin8 zhumin8 deleted the renamne-tag branch November 8, 2025 18:50
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