-
Notifications
You must be signed in to change notification settings - Fork 3
Support Gitlab instances for source repositories #145
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
base: main
Are you sure you want to change the base?
Conversation
|
We use pipeline/commit statuses in gitlab to communicate the state of an external pipeline. However, if Hubcast is handling a merge request sync from a fork, it cannot POST any commit status, as it would require write permission to the fork's API endpoint. See this issue: https://gitlab.com/gitlab-org/gitlab/-/issues/374133 Alternatives:
let me know if you know of others edit: we can use this feature: https://docs.gitlab.com/user/project/merge_requests/status_checks in combination with commit statuses (if we have permissions) edit2: nevermind
|
3de8a84 to
36b1dbd
Compare
Rather than fetching base64-encoded json and decoding it ourselves, request the raw text of the config file available in the github repository. This aligns with the approach used in llnl#145.
* Fetch raw github repository config Rather than fetching base64-encoded json and decoding it ourselves, request the raw text of the config file available in the github repository. This aligns with the approach used in #145. * clarify comment * optional json serialization is not needed
|
re: bot setup if using gitlab as the source repo Gitlab does not provide a similar mechanism to Github apps, where a collection of permissions/webhooks can be "installed" to a repo. From what I've seen in other examples (codecov, jenkins), the workaround is: Instruct Hubcast users to create a "bot" account on the source Github instance. The account should have access at the
Downsides:
|
6af1d46 to
73a1f07
Compare
|
the handlers and clients have names like |
7d740b9 to
53d8891
Compare
c9d17ba to
f21d21b
Compare
f21d21b to
8a206fd
Compare
8a206fd to
31925e8
Compare
31925e8 to
5767781
Compare
Co-authored-by: Caetano Melone <[email protected]> Co-authored-by: Alec Scott <[email protected]>
- checks if a source repository is private and authenticates if necessary - private forks are skipped as we cannot access them - see llnl#189 for the github equivalent implementation
6f7a75c to
cbf8809
Compare
This PR enables syncing commits (and pipeline statuses) between repositories on two Gitlab instances.
Modifications were made to several parts of the codebase:
src/hubcast/web/gitlab/routes.pyFeedback would be helpful on software arch decisions and potential consolidation of functionality.
closes #115
outstanding issues (see comments below):
TODOs after this PR: