fix(e2e): correct team slugs for permission check#2625
Conversation
this corrects the team slugs env to check correct team in tektoncd to run e2e and adds check for member as well before it was only maintainers. Signed-off-by: Zaki Shaikh <zashaikh@redhat.com>
There was a problem hiding this comment.
Code Review
This pull request modifies the .github/scripts/check-pr-permissions.js script to include explicit role checks for team members. The review feedback points out that these checks are redundant since an 'active' membership state already implies the specified roles. Furthermore, the reviewer noted that the changes do not address the intended goal of supporting cross-organization team checks, as the organization remains hardcoded to the repository owner.
| membership.data.state === "active" && | ||
| (membership.data.role === "maintainer" || membership.data.role === "member") |
There was a problem hiding this comment.
The addition of the explicit role check is redundant because membership.data.state === 'active' already confirms the user is a member of the team (which, according to the GitHub API, must be either the 'member' or 'maintainer' role). The PR description's claim that it was 'only maintainers' before is incorrect based on the existing code.
Furthermore, the PR's stated goal of checking teams in the tektoncd organization is not addressed here. The script uses targetOrg (hardcoded to context.repo.owner at line 23), so it will only look for teams within the openshift-pipelines organization. To support teams from tektoncd, the organization handling logic needs to be updated to allow cross-org checks.
| membership.data.state === "active" && | |
| (membership.data.role === "maintainer" || membership.data.role === "member") | |
| membership.data.state === "active" |
References
- Error messages and logs in scripts must be consistent with the actual data being processed.
|
/lgtm |
There was a problem hiding this comment.
Congrats @zakisk your PR Has been approved 🎉
✅ Pull Request Approved
Approval Status:
- Required Approvals: 1
- Current Approvals: 1
👥 Reviewers Who Approved:
| Reviewer | Permission Level | Approval Status |
|---|---|---|
| @chmouel | admin |
✅ |
📝 Next Steps
- Ensure all required checks pass
- Comply with branch protection rules
- Request a maintainer to merge using the
/mergecommand (or merge it
directly if you have repository permission).
Automated by the PAC Boussole 🧭
this corrects the team slugs env to check correct team in tektoncd to run e2e and adds check for member as well before it was only maintainers.
📝 Description of the Change
🔗 Linked GitHub Issue
Fixes #
🧪 Testing Strategy
🤖 AI Assistance
AI assistance can be used for various tasks, such as code generation,
documentation, or testing.
Please indicate whether you have used AI assistance
for this PR and provide details if applicable.
Important
Slop will be simply rejected, if you are using AI assistance you need to make sure you
understand the code generated and that it meets the project's standards. you
need at least know how to run the code and deploy it (if needed). See
startpaac to make it easy
to deploy and test your code changes.
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: Claude noreply@anthropic.com
✅ 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.