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

Automatically open,close and update Gitlab MRs #3

Closed

Conversation

schroedtert
Copy link
Collaborator

When opening a Pull request in the GitHub repo, this will automatically open a MR in the jugit repo. This contains the description, and also the MR template from the jugit repo.

When this PR is updated, e.g., description changed, status changed, the corresponding MR is also updated.

When the PR is closed and not merged, the MR gets also closed. When it is reopenend, also the MR gets reopened.

Overall this is a convenience change, for everyone using GitHub to contribute.

For testing I set up a test repo: https://github.com/schroedtert/petrack-mirror-mr-test
Everything gets mirrored to: https://gitlab.com/schroedtert/petrack-mirror-mr-test

When opening a Pull request in the GitHub repo, this will automatically
open a MR in the jugit repo. This contains the description, and also the
MR template from the jugit repo.

When this PR is updated, e.g., description changed, status changed, the
corresponding MR is also updated.

When the PR is closed and not merged, the MR gets also closed. When it
is reopenend, also the MR gets reopened.

Overall this is a convenience change, for everyone using GitHub to
contribute.
PR_DESCRIPTION_ESCAPED=$(jq -Rsa . <<< "${{ github.event.pull_request.body }}")

# Fetch the GitLab MR template
TEMPLATE_URL="https://juchat.de/api/v4/projects/${{ env.GITLAB_PROJECT_ID }}/repository/files/.gitlab%2Fmerge_request_templates%2Fdefault.md/raw?ref=${{ env.PR_TARGET_BRANCH }}"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this should be jugit?

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

Successfully merging this pull request may close these issues.

3 participants