Skip to content

chore: add missing headers to run/ samples#4253

Open
glasnt wants to merge 1 commit intomainfrom
header-checker-missing
Open

chore: add missing headers to run/ samples#4253
glasnt wants to merge 1 commit intomainfrom
header-checker-missing

Conversation

@glasnt
Copy link
Contributor

@glasnt glasnt commented Mar 11, 2026

Identified in #4214, many samples in this repo are missing licence headers according to the header-checker-lint check.

This PR adds headers for run/ samples

Note: more samples require headers, but many samples may not pass CI, so this PR is intentionally a partial fix.

Added via command go run github.com/google/addlicense@v1.2.0 run/.

  • Please merge this PR for me once it is approved

Note: Any check with (dev), (experimental), or (legacy) can be ignored and should not block your PR from merging (see CI testing).

Identified in #4214, many samples in this repo are missing licence headers according to
the header-checker-lint check.

This PR adds headers for run/ samples

Note: more samples require headers, but many samples may not pass CI, so this PR is intentionally a partial fix.

Added via command `go run github.com/google/addlicense@v1.2.0 run/.`
@glasnt glasnt requested review from a team as code owners March 11, 2026 04:41
@product-auto-label product-auto-label bot added samples Issues that are directly related to samples. api: run Issues related to the Cloud Run API. asset: pattern DEE Asset tagging - Pattern. labels Mar 11, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, 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 improves the repository's compliance by systematically adding the required Apache 2.0 license headers to various sample files located in the run/ directory. This effort directly addresses a linting check failure related to missing headers, ensuring that these code examples adhere to licensing standards. The changes were applied programmatically, focusing on a subset of files that could be updated without immediate CI issues, setting the stage for further header additions.

Highlights

  • License Header Compliance: Added missing Apache 2.0 license headers to several sample files within the run/ directory, addressing an identified compliance issue.
  • Partial Fix: This pull request provides a partial fix for the missing license headers, focusing specifically on run/ samples, with the understanding that more files may require headers in future updates.
  • Automated Header Addition: The license headers were added using the go run github.com/google/addlicense@v1.2.0 run/. command, streamlining the process.
Changelog
  • run/hello-broken/test/e2e_test_cleanup.yaml
    • Added Apache 2.0 license header.
  • run/hello-broken/test/e2e_test_setup.yaml
    • Added Apache 2.0 license header.
  • run/helloworld/test/e2e_test_cleanup.yaml
    • Added Apache 2.0 license header.
  • run/helloworld/test/e2e_test_setup.yaml
    • Added Apache 2.0 license header.
  • run/image-processing/test/app.test.js
    • Added Apache 2.0 license header.
  • run/image-processing/test/e2e_test_cleanup.yaml
    • Added Apache 2.0 license header.
  • run/image-processing/test/e2e_test_setup.yaml
    • Added Apache 2.0 license header.
  • run/logging-manual/metadata.js
    • Added Apache 2.0 license header.
  • run/logging-manual/test/e2e_test_cleanup.yaml
    • Added Apache 2.0 license header.
  • run/logging-manual/test/e2e_test_setup.yaml
    • Added Apache 2.0 license header.
  • run/pubsub/test/e2e_test_cleanup.yaml
    • Added Apache 2.0 license header.
  • run/pubsub/test/e2e_test_setup.yaml
    • Added Apache 2.0 license header.
  • run/websockets/public/index.css
    • Added Apache 2.0 license header.
  • run/websockets/test/e2e_test_cleanup.yaml
    • Added Apache 2.0 license header.
  • run/websockets/test/e2e_test_setup.yaml
    • Added Apache 2.0 license header.
Activity
  • The author requested that the PR be merged automatically once approved.
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
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 adds license headers to several files in the run/ directory. However, it appears the addlicense tool has incorrectly set the copyright year to 2026 in all the new headers. This is a future year and should be corrected. I've left a comment on one of the YAML files with a suggestion. Please apply the fix to all files changed in this PR, adapting the comment style for .js and .css files.

@@ -1,3 +1,17 @@
# Copyright 2026 Google LLC
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The copyright year is set to 2026, which is a future year. This seems to be an error from the addlicense tool and affects all files in this PR. Please correct the year in all the new license headers. The year should typically be the year of creation or last significant modification.

# Copyright <YEAR> Google LLC

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

Labels

api: run Issues related to the Cloud Run API. asset: pattern DEE Asset tagging - Pattern. samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant