Skip to content

Update AddMember.java comments#9886

Merged
melaniedejong merged 1 commit intomelaniedejong-patch-1from
melaniedejong-patch-1-1
Dec 20, 2024
Merged

Update AddMember.java comments#9886
melaniedejong merged 1 commit intomelaniedejong-patch-1from
melaniedejong-patch-1-1

Conversation

@melaniedejong
Copy link
Contributor

Includes changing "member" to "principal" and linking to principal identifiers page instead of specifying recommended format.

Description

Fixes #

Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.

Checklist

  • I have followed Sample Format Guide
  • pom.xml parent set to latest shared-configuration
  • Appropriate changes to README are included in PR
  • These samples need a new API enabled in testing projects to pass (let us know which ones)
  • These samples need a new/updated env vars in testing projects set to pass (let us know which ones)
  • Tests pass: mvn clean verify required
  • Lint passes: mvn -P lint checkstyle:check required
  • Static Analysis: mvn -P lint clean compile pmd:cpd-check spotbugs:check advisory only
  • This sample adds a new sample directory, and I updated the CODEOWNERS file with the codeowners for this sample
  • This sample adds a new Product API, and I updated the Blunderbuss issue/PR auto-assigner with the codeowners for this sample
  • Please merge this PR for me once it is approved

Includes changing "member" to "principal" and linking to principal identifiers page instead of specifying recommended format.
@melaniedejong melaniedejong requested review from a team and yoshi-approver as code owners December 20, 2024 20:28
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Hi @melaniedejong and reviewers,

I'm currently reviewing this pull request and will post my full review in a few minutes. In the meantime, here's a quick summary to help everyone get up to speed:

This pull request updates the comments in AddMember.java to improve clarity and accuracy.

Intent:
The main goal is to replace the term "member" with "principal" throughout the code and comments for better alignment with Google Cloud IAM terminology. Additionally, instead of specifying a recommended format for principal identifiers, the updated comments now link to the official Google Cloud documentation page for principal identifiers.

Changes:

  • The file iam/snippets/src/main/java/AddMember.java has been modified:
    • Lines 29-30: The comment // TODO: Replace with your member. has been changed to // TODO: Replace with your principal. // For examples, see https://cloud.google.com/iam/docs/principal-identifiers The placeholder member variable is updated to reflect the change.
    • Line 35: The comment // Adds a member to a pre-existing role. is updated to // Adds a principal to a pre-existing role.
    • Line 47: The comment // Update the policy to add the member. is updated to // Update the policy to add the principal.

These changes ensure consistency with Google Cloud IAM terminology and provide users with a direct link to relevant documentation.


Here's a little haiku to lighten the mood:

Code flows like a stream,
Clear comments guide the way,
Reviews bring the sun.

Let me know if you have any questions!

Best,
Gemini

@product-auto-label product-auto-label bot added samples Issues that are directly related to samples. api: iam Issues related to the Identity and Access Management API. labels Dec 20, 2024
@melaniedejong melaniedejong merged commit 0a34be5 into melaniedejong-patch-1 Dec 20, 2024
@melaniedejong melaniedejong deleted the melaniedejong-patch-1-1 branch December 20, 2024 20:29
@ghost
Copy link

ghost commented Dec 20, 2024

Gemini encountered an error creating the review. You can try again by commenting @code-review-assist review.

telpirion pushed a commit that referenced this pull request Jun 17, 2025
* Update Quickstart.java comments

Includes changing "member" to "principal" and linking to principal identifiers page instead of specifying recommended format.

* Update AddMember.java comments (#9886)

Includes changing "member" to "principal" and linking to principal identifiers page instead of specifying recommended format.

* Update AddBinding.java

Includes changing "member" to "principal" and linking to principal identifiers page instead of specifying recommended format.
 melaniedejong-patch-1 (#4895)

* Update RemoveMember.java comments

Includes changing "member" to "principal" and linking to principal identifiers page instead of specifying recommended format.

* Update Quickstart.java

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

Labels

api: iam Issues related to the Identity and Access Management API. samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants