Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Show first seven char of commit hash #566

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

Merged
justin808 merged 2 commits into master from show-first-7-char-of-commit-hash
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/helpers/pages_helper.rb
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ def git_commit_sha

def git_commit_sha_short
full_sha = git_commit_sha
full_sha[-7..]
full_sha[...7]
end
end
4 changes: 2 additions & 2 deletions spec/system/pages_spec.rb
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

context "when .source_version file does not exist" do
let(:sha) { "94d92356828a56db25fccff9d50f41c525eead5x" }
let(:expected_text) { "5eead5x" }
let(:expected_text) { "94d9235" }

before do
# stub this method since we need to control what the sha actually is
Expand All @@ -31,7 +31,7 @@

context "when .source_version file exists" do
let(:sha) { "94d92356828a56db25fccff9d50f41c525eead5y" }
let(:expected_text) { "5eead5y" }
let(:expected_text) { "94d9235" }

before { `cd #{Rails.root} && echo #{sha} > .source_version` }

Expand Down

AltStyle によって変換されたページ (->オリジナル) /