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

Prepend branch name with repository name #3

Merged
merged 1 commit into from
May 29, 2020

Conversation

masterleinad
Copy link
Contributor

We are also using the workflow with a GitHub repository with multiple people and have multiple forks. Since GitHub doesn't allow secrets to be accessed in pull requests, we rely on this workflow running on the respective branches in the forks.
In order to avoid pushing branches with the same name to GitLab from multiple forks, it's useful to prepend the branch name with the repository name which is what this pull request does.
Unfortunately, the resulting branch name contains slahes that need to be converted in a HTML-compatible way.

@SvanBoxel
Copy link
Owner

This makes sense. 👍

@SvanBoxel SvanBoxel merged commit 5027241 into SvanBoxel:master May 29, 2020
@jensites
Copy link

this breaks existing integrations, especially if the original branch already exists on gitlab, you'll get a broken pipeline:

error: src refspec {GITHUB_REPOSITORY}/{BRANCH} does not match any.
error: failed to push some refs to 'https://gitlab.com/{GILAB_REPO}'

Adding this to support the forking setup feels like a special use-case to me, which preferably is a config option you can set or not set.

@SvanBoxel
Copy link
Owner

@jensites Could you make sure to point to a release pointer and not the master branch in your pipelines? I agree it should be a config option which can be added in the next release.

aehart pushed a commit to aehart/gitlab-mirror-and-ci-action that referenced this pull request May 5, 2021
tiggi pushed a commit to tiggi/gitlab-mirror-and-ci-action that referenced this pull request Sep 21, 2023
tiggi pushed a commit to tiggi/gitlab-mirror-and-ci-action that referenced this pull request Nov 3, 2023
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

Successfully merging this pull request may close these issues.

3 participants