-
Notifications
You must be signed in to change notification settings - Fork 116
refactor: Migrate build tags from +build to //go:build directives #2306
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 our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: Migrate build tags from +build to //go:build directives #2306
Conversation
Converted deprecated `// +build` directives to the modern `//go:build` format across several files. This standardized the build constraint declarations. Signed-off-by: Chmouel Boudjnah <[email protected]>
Summary of ChangesHello @chmouel, 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 refactors the project's Go source files by updating the build constraint syntax. It replaces the older Highlights
Using Gemini Code AssistThe 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
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 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
|
π PR Lint Feedback
|
|
Warning Gemini encountered an error creating the review. You can try again by commenting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
There was a problem hiding this 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 modernizes Go build tags across test files and generated code by removing the deprecated // +build syntax in favor of the newer //go:build directive introduced in Go 1.17.
- Removes legacy
// +buildbuild constraint comments from all e2e test files - Updates the autogenerated deepcopy file to use only the modern build tag format
- Maintains the
//go:builddirective as the single source of truth for build constraints
Reviewed Changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/repository_webhook_test.go | Removed deprecated // +build e2e build tag |
| test/repo_validation_test.go | Removed deprecated // +build e2e build tag |
| test/invalid_event_test.go | Removed deprecated // +build e2e build tag |
| test/gitlab_push_gitops_command_test.go | Removed deprecated // +build e2e build tag |
| test/gitlab_oktotest_thread_reply_test.go | Removed deprecated // +build e2e build tag |
| test/gitlab_incoming_webhook_test.go | Removed deprecated // +build e2e build tag |
| test/gitlab_delete_tag_event_test.go | Removed deprecated // +build e2e build tag |
| test/github_tkn_pac_cli_test.go | Removed deprecated // +build e2e build tag |
| test/github_scope_token_to_list_of_private_public_repos_test.go | Removed deprecated // +build e2e build tag |
| test/github_push_test.go | Removed deprecated // +build e2e build tag |
| test/github_push_retest_test.go | Removed deprecated // +build e2e build tag |
| test/github_pullrequest_test_comment_test.go | Removed deprecated // +build e2e build tag |
| test/github_pullrequest_retest_test.go | Removed deprecated // +build e2e build tag |
| test/github_pullrequest_rerequest_test.go | Removed deprecated // +build e2e build tag |
| test/github_pullrequest_privaterepository_test.go | Removed deprecated // +build e2e build tag |
| test/github_pullrequest_oktotest_test.go | Removed deprecated // +build e2e build tag |
| test/github_pullrequest_concurrency_test.go | Removed deprecated // +build e2e build tag |
| test/github_pullrequest_concurrency_multiplepr_test.go | Removed deprecated // +build e2e build tag |
| test/github_incoming_test.go | Removed deprecated // +build e2e build tag |
| test/github_config_maxkeepruns_test.go | Removed deprecated // +build e2e build tag |
| test/gitea_results_annotation_test.go | Removed deprecated // +build e2e build tag |
| test/bitbucket_datacenter_push_test.go | Removed deprecated // +build e2e build tag |
| test/bitbucket_datacenter_pull_request_test.go | Removed deprecated // +build e2e build tag |
| test/bitbucket_datacenter_dynamic_variables_test.go | Removed deprecated // +build e2e build tag |
| test/bitbucket_cloud_pullrequest_test.go | Removed deprecated // +build e2e build tag |
| pkg/apis/pipelinesascode/v1alpha1/zz_generated.deepcopy.go | Removed deprecated // +build !ignore_autogenerated build tag |
π‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
π Description of the Change
Converted deprecated
// +builddirectives to the modern//go:buildformat across several files. This standardized the build constraint declarations.π¨π»β Linked Jira
π Linked GitHub Issue
Fixes #
π Type of Change
fix:)feat:)feat!:,fix!:)docs:)chore:)refactor:)enhance:)deps:)π§ͺ Testing Strategy
π€ AI Assistance
If you have used AI assistance, please provide the following details:
Which LLM was used?
Extent of AI Assistance:
Important
If the majority of the code in this PR was generated by an AI, please add a
Co-authored-bytrailer to your commit message.For example:
Co-authored-by: Gemini [email protected]
Co-authored-by: ChatGPT [email protected]
Co-authored-by: Claude [email protected]
Co-authored-by: Cursor [email protected]
Co-authored-by: Copilot [email protected]
**π‘You can use the script
./hack/add-llm-coauthor.shto automatically addthese co-author trailers to your commits.
β Submitter Checklist
fix:,feat:) matches the "Type of Change" I selected above.make testandmake lintlocally to check for and fix anyissues. For an efficient workflow, I have considered installing
pre-commit and running
pre-commit installtoautomate these checks.