Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #9287

Closed
Open
Created May 12, 2015 by Administrator@rootOwner

Merge Request across forks is not working

Created by: jonathanscruz

Submitting a MR from one fork to another fails to trigger the correct build. Sometimes no build gets triggered. Other times a build gets triggered with gitlabSourceRepoURL set to the target fork's URL instead of the actual source fork's URL. Here is the data sent by gitlab:

May 12, 2015 12:36:57 PM FINE com.dabsquared.gitlabjenkins.GitLabWebHook generateBuild
data: {
    "object_kind": "merge_request",
    "user":     {
        "name": "Jonathan Cruz",
        "username": "jcruz",
        "avatar_url": "https://secure.gravatar.com/avatar/bad30ee9b8d26f6349573d2d004e6d82?s=40&d=identicon"
    },
    "object_attributes":     {
        "id": 3327,
        "target_branch": "develop",
        "source_branch": "test_ci",
        "source_project_id": 213,
        "author_id": 42,
        "assignee_id": null,
        "title": "Test ci DO NOT MERGE",
        "created_at": "2015-05-12 17:36:55 UTC",
        "updated_at": "2015-05-12 17:36:55 UTC",
        "milestone_id": null,
        "state": "opened",
        "merge_status": "unchecked",
        "target_project_id": 212,
        "iid": 276,
        "description": "",
        "position": 0,
        "locked_at": null,
        "source":         {
            "name": "carrier-framework",
            "ssh_url": "[email protected]:jcruz/carrier-framework.git",
            "http_url": "https://git.trustwave.com/jcruz/carrier-framework.git",
            "namespace": "jcruz",
            "visibility_level": 10
        },
        "target":         {
            "name": "carrier-framework",
            "ssh_url": "[email protected]:engineering/carrier-framework.git",
            "http_url": "https://git.trustwave.com/engineering/carrier-framework.git",
            "namespace": "Engineering",
            "visibility_level": 10
        },
        "last_commit":         {
            "id": "d13c6dd0729910d5c8cc7afeeeb5654f2d648014",
            "message": "DO NOT MERGE\n",
            "timestamp": "2015-05-12T12:32:20-05:00",
            "url": "https://git.trustwave.com/jcruz/carrier-framework/commit/d13c6dd0729910d5c8cc7afeeeb5654f2d648014",
            "author":             {
                "name": "Jonathan Cruz",
                "email": ""
            }
        }
    }
}
May 12, 2015 12:36:57 PM INFO com.dabsquared.gitlabjenkins.GitLabPushTrigger$2 run
carrier-framework-ci triggered for merge request.

I would expect a job to be triggered with the following params: gitlabSourceBranch: test_ci gitlabTargetBranch: develop gitlabSourceRepoURL: [email protected]:jcruz/carrier-framework.git gitlabSourceRepoName: jcruz

Sometimes I might get: gitlabSourceBranch: test_ci gitlabTargetBranch: develop gitlabSourceRepoURL: [email protected]:engineering/carrier-framework.git gitlabSourceRepoName: origin

Sometimes no build is triggered at all.

Assignee
Assign to
Time tracking