GitLab OAuth Account Map - #179
Open
cmelone wants to merge 2 commits into
Open
Conversation
- modified accountmap interface to default caller to async to avoid conditional calling logic - the oauth account map requires a numerical github id, changed the interface to accept a full user dict from github, the implementations decide which keys to use for their mapping - added requester field to oauth account map as gitlab requires an id string associated with each request
cmelone
force-pushed
the
add/gl-oauth-map
branch
from
January 14, 2026 21:54
ce198c0 to
4acfc5c
Compare
cmelone
marked this pull request as ready for review
January 14, 2026 22:00
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a mapping between two accounts: a user from an OAuth provider and a user in a gitlab instance.
The goal is to link a contributor on github.com to their corresponding account on the destination gitlab instance. By adding github as an OAuth provider, we can verify that both identities belong to the same person. When a push event comes in from github, the mapper checks whether the commit author exists as a gitlab user. If they do, the commit can be pushed to the destination repository.
To use this feature, the following environment variables must be set:
HC_ACCOUNT_MAP_TYPE="gitlab_oauth"HC_GL_OAUTH_ACCESS_TOKEN-- a personal access token created by an admin of the Gitlab instance withread_apiscope (to query the list of users on the instance)HC_GL_OAUTH_PROVIDER="github"-- have only tested this with Github so far, but I imagine that Hubcast users may want to link between two Gitlab instances.--
This has been tested on gitlab.staging.spack.io.