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

FIX: Do not shorten commit hashes for compare links #128

Merged
merged 1 commit into from Jan 22, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 5 additions & 3 deletions assets/docker-manager-app.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions lib/docker_manager/git_repo.rb
Expand Up @@ -32,11 +32,11 @@ def valid?
end

def latest_local_commit
run "rev-parse --short HEAD"
run "rev-parse HEAD"
end

def latest_origin_commit
run "rev-parse --short #{tracking_branch}"
run "rev-parse #{tracking_branch}"
end

def latest_local_tag_version
Expand Down
7 changes: 5 additions & 2 deletions manager-client/app/models/repo.js
Expand Up @@ -24,11 +24,14 @@ const Repo = EmberObject.extend({
}),

prettyVersion: computed("version", "pretty_version", function () {
return this.get("pretty_version") || this.get("version");
return this.get("pretty_version") || this.get("version")?.substring(0, 8);
}),

prettyLatestVersion: computed("latest.{version,pretty_version}", function () {
return this.get("latest.pretty_version") || this.get("latest.version");
return (
this.get("latest.pretty_version") ||
this.get("latest.version")?.substring(0, 8)
);
}),

get shouldCheck() {
Expand Down
4 changes: 2 additions & 2 deletions manager-client/app/templates/components/repo-status.hbs
Expand Up @@ -5,7 +5,7 @@
</td>
<td>
<a href="{{repo.url}}">{{repo.name}}</a>
<span class="current commit-hash">{{repo.prettyVersion}}</span>
<span class="current commit-hash" title={{repo.version}}>{{repo.prettyVersion}}</span>
</td>
<td>
{{#if repo.checkingStatus}}
Expand All @@ -16,7 +16,7 @@
<div class='new-version'>
<h4>New Version Available!</h4>
<ul>
<li>Remote Version: <span class="new commit-hash">{{repo.prettyLatestVersion}}</span></li>
<li>Remote Version: <span class="new commit-hash" title={{repo.latestVersion}}>{{repo.prettyLatestVersion}}</span></li>
<li>Last Updated:
{{#if repo.latest.date}}
{{moment-from-now repo.latest.date interval=1000}}
Expand Down