Skip to content
Snippets Groups Projects
Commit e10f5f4f authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Merge branch 'last-commit-project-page' into 'master'

Show last commit from default branch on project home page

Implements #2705 

Screenshot: 

![Screenshot_2015-10-15_19.03.29](https://gitlab.com/gitlab-org/gitlab-ce/uploads/ef1cfa6764ab0ec5e7584ae61980a47d/Screenshot_2015-10-15_19.03.29.png

)


Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>

cc @skyruler 

See merge request !1610
parents 0c2df939 47e17103
No related branches found
No related tags found
No related merge requests found
Please view this file on the master branch, on stable branches it's out of date.
 
v 8.2.0 (unreleased)
- Show last project commit to default branch on project home page
v 8.1.0 (unreleased)
- Fix error preventing displaying of commit data for a directory with a leading dot (Stan Hu)
- Speed up load times of issue detail pages by roughly 1.5x
Loading
Loading
Loading
Loading
@@ -18,6 +18,7 @@
line-height: 36px;
}
 
.content-block,
.gray-content-block {
margin: -$gl-padding;
background-color: $background-color;
Loading
Loading
@@ -27,6 +28,10 @@
border-bottom: 1px solid $border-color;
color: $gl-gray;
 
&.white {
background-color: white;
}
&.top-block {
border-top: none;
}
Loading
Loading
Loading
Loading
@@ -511,3 +511,34 @@ pre.light-well {
margin-top: -1px;
}
}
.project-last-commit {
margin: 0 7px;
.ci-status {
margin-right: 16px;
}
.commit-row-message {
color: $gl-gray;
}
.commit_short_id {
margin-right: 5px;
color: $gl-link-color;
font-weight: 600;
}
.commit-author-link {
margin-left: 7px;
text-decoration: none;
.avatar {
float: none;
margin-right: 4px;
}
.commit-author-name {
font-weight: 600;
}
}
}
.project-last-commit
- ci_commit = project.ci_commit(commit.sha)
- if ci_commit
= link_to ci_status_path(ci_commit), class: "ci-status ci-#{ci_commit.status}" do
= ci_status_icon(ci_commit)
= ci_commit.status
= link_to commit.short_id, namespace_project_commit_path(project.namespace, project, commit), class: "commit_short_id"
= link_to_gfm commit.title, namespace_project_commit_path(project.namespace, project, commit.id), class: "commit-row-message"
&middot;
#{time_ago_with_tooltip(commit.committed_date, skip_js: true)} by
= commit_author_link(commit, avatar: true, size: 24)
Loading
Loading
@@ -64,6 +64,10 @@
= icon("exclamation-triangle fw")
Archived project! Repository is read-only
 
- if @repository.commit
.content-block.second-block.white
= render 'projects/last_commit', commit: @repository.commit, project: @project
%section
- if prefer_readme?
.project-show-readme
Loading
Loading
Loading
Loading
@@ -31,6 +31,12 @@ Feature: Project
And I visit project "Shop" page
Then I should see project "Shop" README
 
Scenario: I should see last commit with CI
Given project "Shop" has CI enabled
Given project "Shop" has CI build
And I visit project "Shop" page
And I should see last commit with CI status
@javascript
Scenario: I should see project activity
When I visit project "Shop" activity page
Loading
Loading
Loading
Loading
@@ -206,4 +206,11 @@ module SharedProject
project = Project.find_by(name: "Shop")
create :ci_commit, gl_project: project, sha: project.commit.sha
end
step 'I should see last commit with CI status' do
page.within ".project-last-commit" do
expect(page).to have_content(project.commit.sha[0..6])
expect(page).to have_content("skipped")
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment