Closed wayn closed 3 months ago
what?
Give more details, examples, and reproducible code demonstrating the problem, if it exists
ok, the code in the gitlab_provider.py in line 32 oauth_token is used for oauth token authentication private_token is used for personal access token
Hi @wayn What's the use case to use personal access token with GitLab? Usually you won't want to reply to webhooks with a personal access token.
Hi @okotek I see the code in project config settings use "PERSONAL_ACCESS_TOKEN". And if use oauth token may need to get access token dynamic but not define in the config file. I'm test set the "PERSONAL_ACCESS_TOKEN" in .secrets.toml config, and change the code oauth_token in gitlab_provider.py line 32 to private_token works well
I mean, in hat scenario would you deploy pragent with a personal access token? Do you want to suggest a PR?
gitlab_provider asign personal_access_token to oauth_token may not work?
self.gl = gitlab.Gitlab( url=gitlab_url, oauth_token=gitlab_access_token )
may change to
self.gl = gitlab.Gitlab( url=gitlab_url, private_token=gitlab_access_token )