Skip to content

Conversation

@chmouel
Copy link
Member

@chmouel chmouel commented Oct 30, 2025

πŸ“ Description of the Change

Converted deprecated // +build directives to the modern //go:build format across several files. This standardized the build constraint declarations.

πŸ‘¨πŸ»β€ Linked Jira

πŸ”— Linked GitHub Issue

Fixes #

πŸš€ Type of Change

  • πŸ› Bug fix (fix:)
  • ✨ New feature (feat:)
  • πŸ’₯ Breaking change (feat!:, fix!:)
  • πŸ“š Documentation update (docs:)
  • βš™οΈ Chore (chore:)
  • πŸ’… Refactor (refactor:)
  • πŸ”§ Enhancement (enhance:)
  • πŸ“¦ Dependency update (deps:)

πŸ§ͺ Testing Strategy

  • Unit tests
  • Integration tests
  • End-to-end tests
  • Manual testing
  • Not Applicable

πŸ€– AI Assistance

  • I have not used any AI assistance for this PR.
  • I have used AI assistance for this PR.

If you have used AI assistance, please provide the following details:

Which LLM was used?

  • GitHub Copilot
  • ChatGPT (OpenAI)
  • Claude (Anthropic)
  • Cursor
  • Gemini (Google)
  • Other: ____________

Extent of AI Assistance:

  • Documentation and research only
  • Unit tests or E2E tests only
  • Code generation (parts of the code)
  • Full code generation (most of the PR)
  • PR description and comments
  • Commit message(s)

Important

If the majority of the code in this PR was generated by an AI, please add a Co-authored-by trailer 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.sh to automatically add
these co-author trailers to your commits.

βœ… Submitter Checklist

  • πŸ“ My commit messages are clear, informative, and follow the project's How to write a git commit message guide. The Gitlint linter ensures in CI it's properly validated
  • ✨ I have ensured my commit message prefix (e.g., fix:, feat:) matches the "Type of Change" I selected above.
  • β™½ I have run make test and make lint locally to check for and fix any
    issues. For an efficient workflow, I have considered installing
    pre-commit and running pre-commit install to
    automate these checks.
  • πŸ“– I have added or updated documentation for any user-facing changes.
  • πŸ§ͺ I have added sufficient unit tests for my code changes.
  • 🎁 I have added end-to-end tests where feasible. See README for more details.
  • πŸ”Ž I have addressed any CI test flakiness or provided a clear reason to bypass it.
  • If adding a provider feature, I have filled in the following and updated the provider documentation:
    • GitHub App
    • GitHub Webhook
    • Gitea/Forgejo
    • GitLab
    • Bitbucket Cloud
    • Bitbucket Data Center

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]>
Copilot AI review requested due to automatic review settings October 30, 2025 16:14
@gemini-code-assist
Copy link

Summary of Changes

Hello @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 +build directives with the //go:build format, which became standard with Go 1.16. This change is a technical debt cleanup, ensuring the codebase adheres to modern Go conventions and maintains compatibility with newer Go toolchains without altering any functional logic.

Highlights

  • Build Tag Migration: The primary change involves migrating all Go build tags from the deprecated +build syntax to the modern //go:build directives.
  • Codebase Consistency: This update is applied across various Go files, predominantly within the test/ directories and one generated API file, ensuring consistency with current Go toolchain practices.
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. ↩

@pipelines-as-code
Copy link

πŸ” PR Lint Feedback

Note: This automated check helps ensure your PR follows our contribution guidelines.

⚠️ Items that need attention:

🎫 Jira reference

Add a Jira reference in the description using one of the following formats:

  • https://issues.redhat.com/browse/SRVKP-<number>

If no SRVKP ticket exists yet, link a GitHub issue instead (e.g., Fixes #123).
Minor housekeeping PRs without Jira coverage can skip this after confirming with reviewers.


πŸ€– AI attribution

The following commits lack an explicit AI attribution footer:

  • 9c25366 refactor: Migrate build tags from +build to //go:build directives

If no AI assistance was used for a commit, you can ignore this warning.
Otherwise add an Assisted-by: or Co-authored-by: footer referencing the AI used.


ℹ️ Next Steps

  • Review and address the items above
  • Push new commits to update this PR
  • This comment will be automatically updated when issues are resolved
πŸ”§ Admin Tools (click to expand)

Automated Issue/Ticket Creation:

  • /issue-create - Generate a GitHub issue from this PR content using AI
  • /jira-create - Create a SRVKP Jira ticket from this PR content using AI

⚠️ Important: Always review and edit generated content before finalizing tickets/issues.
The AI-generated content should be used as a starting point and may need adjustments.

These commands are available to maintainers and will post the generated content as PR comments for review.

πŸ€– This feedback was generated automatically by the PR CI system

@gemini-code-assist
Copy link

Warning

Gemini encountered an error creating the review. You can try again by commenting /gemini review.

Copy link
Member

@aThorp96 aThorp96 left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link
Contributor

Copilot AI 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 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 // +build build constraint comments from all e2e test files
  • Updates the autogenerated deepcopy file to use only the modern build tag format
  • Maintains the //go:build directive 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.

@infernus01 infernus01 merged commit f3db57f into openshift-pipelines:main Oct 30, 2025
12 of 15 checks passed
@chmouel chmouel deleted the refactor-migrate-build-tags-from-build-to-gobuild branch October 30, 2025 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants