-
Notifications
You must be signed in to change notification settings - Fork 47
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
GL-1723: Added expires_at mandatory arg for codestudio token. #1617
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1617 +/- ##
=========================================
Coverage 91.84% 91.84%
Complexity 1819 1819
=========================================
Files 124 124
Lines 6513 6514 +1
=========================================
+ Hits 5982 5983 +1
Misses 531 531
☔ View full report in Codecov by Sentry. |
Hi @danepowell I don't see option to add label to this PR due to which one check is failing. This was breaking change for codestudio. will you please help us to add label and merge this PR in main. |
@@ -161,8 +161,10 @@ private function createProjectAccessToken(array $project, string $projectAccessT | |||
$this->checklist->completePreviousItem(); | |||
} | |||
$this->checklist->addItem("Creating access token named <comment>$projectAccessTokenName</comment>"); | |||
$dateTime = new \DateTime('tomorrow'); |
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.
This token needs to be long-lived since it's going to be stored as a CI/CD variable, right? Should we max out the lifetime (1 year)?
I'm going to go ahead and merge this. If you think the expiry time or anything else needs to be adjusted, let me know. |
The ability to create personal access tokens without expiry was deprecated in GitLab 15.4 and removed in GitLab 16.0. In GitLab 16.0 and later, existing personal access tokens without an expiry date are automatically given an expiry date of 365 days.
Codestudio main branch is upgraded with gitlab 16.x version. hence this is breaking change.
An optional variable in previous version https://archives.docs.gitlab.com/15.11/ee/api/project_access_tokens.html#create-a-project-access-token become mandatory in 16.x.x + versions https://docs.gitlab.com/ee/api/project_access_tokens.html#create-a-project-access-token.
Solution: As a part this PR added mandatory arg
expires_at
with valid expiry date.