Skip to content
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

gitlab_provider asign personal_access_token to oauth_token may not work? #875

Open
wayn opened this issue Apr 19, 2024 · 5 comments
Open

Comments

@wayn
Copy link

wayn commented Apr 19, 2024

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 )

@mrT23
Copy link
Collaborator

mrT23 commented Apr 20, 2024

what?

Give more details, examples, and reproducible code demonstrating the problem, if it exists

@wayn
Copy link
Author

wayn commented Apr 21, 2024

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

@okotek
Copy link
Contributor

okotek commented Apr 21, 2024

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.

@wayn
Copy link
Author

wayn commented Apr 22, 2024

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

@okotek
Copy link
Contributor

okotek commented Apr 22, 2024

I mean, in hat scenario would you deploy pragent with a personal access token? Do you want to suggest a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@wayn @okotek @mrT23 and others