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
  • #4943

Closed
Open
Created Aug 29, 2013 by Administrator@rootOwner

Build status image of CI Integration is not displayed on merge_request of forked projects

Created by: jderusse

There is a bug on merged reqquest when the target project is different to the source project.

GitLab 6.0 GitLabCi 3.0

regarding https://github.com/gitlabhq/gitlabhq/commit/ca936d2784773652530e7b02af40b925ca45a4d6#L2R106

  • project refers to the actual project (probably the target of the merge_request)
  • last_comit refers to a commit from the source project

With this request, GitLabCi is looking for a build concerning the target project and a commit from the source project. And because de sha does not belong to the project, it return NULL

To fix the issue, I change in app/controllers/merge_requests_controller.rb

def ci_status
    status = merge_request.source_project.gitlab_ci_service.commit_status(merge_request.last_commit.sha)
    ...
Assignee
Assign to
Time tracking