-
Notifications
You must be signed in to change notification settings - Fork 2
refs platform/board#3920: check if membership exist #24
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
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
/improve |
PR Code Suggestions ✨No code suggestions found for the PR. |
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 enhances the GitLab project membership handling by adding validation to check if the current user is already a maintainer before attempting to assign membership. This prevents conflicts when the user already has project access.
- Add data source to fetch existing project memberships
- Implement logic to check if current user is already a maintainer
- Conditionally assign membership only when user is not already a maintainer
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
main.tf | Adds membership data source and conditional logic to prevent duplicate membership assignments |
outputs.tf | Removes trailing whitespace |
README.md | Documents the membership behavior and potential conflicts |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
PR Type
Enhancement
Description
Add data source to check existing project memberships
Export project memberships through new output variable
Enable membership validation before assignment operations
Support membership existence checks for GitLab projects
Changes walkthrough 📝
main.tf
Add project membership data source
main.tf
gitlab_project_membership
data source to fetch existingmemberships
outputs.tf
Export project memberships output
outputs.tf
gitlab_project_memberships