fix(credentials): scope GitLab personal tokens to organizations - #7603
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The PR should not merge until the migration safely handles or rejects existing Findings
|
| if ( | ||
| target && | ||
| (target.revokedAt || | ||
| target.status === 'revoked' || | ||
| (target.userId && target.userId !== owner.id)) |
There was a problem hiding this comment.
Failed enrollment remains unusable
When an existing organization enrollment is in delivery_failed state and already has the owner's user ID, this check accepts it and the later update leaves its status unchanged. The migration then binds the credential to that enrollment and reports success, but normal token resolution only accepts invited, in_progress, or completed enrollments. The migrated token is therefore unusable. Reject delivery_failed targets or transition them to in_progress, as the live connection path does.
Knowledge Base Used:
Summary
Stacked on #7598.
Type of Change
Testing
Checklist