Skip to content

Commit

Permalink
get tag details
Browse files Browse the repository at this point in the history
  • Loading branch information
phil294 committed May 1, 2023
1 parent d6110f6 commit a2cc721
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
9 changes: 9 additions & 0 deletions web/src/views/CommitDetails.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ export default defineComponent
tags = computed =>
props.commit.refs.filter (ref) =>
ref.type == "tag"
``###* @type {Ref<string[]>} ###
tag_details = ref []

stash = computed =>
props.commit.refs.find (ref) =>
Expand All @@ -46,7 +48,13 @@ export default defineComponent
path: split[2]
insertions: Number split[1]
deletions: Number split[0]) or []

body.value = await git "show -s --format=\"%b\" #{props.commit.hash}"

tag_details.value = []
for tag from tags.value
details = await git "show --format='' --quiet refs/tags/" + tag.name.replace(/^tag: /, '')
tag_details.value.push details

show_diff = (###* @type string ### filepath) =>
exchange_message 'open-diff',
Expand All @@ -59,6 +67,7 @@ export default defineComponent
{
branch_tips
tags
tag_details
stash
changed_files
show_diff
Expand Down
3 changes: 2 additions & 1 deletion web/src/views/CommitDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ div
git-action-button v-for="action of branch_actions(branch_tip.name)" :git_action="action"

div v-if="tags.length"
ul.tags v-for="tag of tags"
ul.tags v-for="tag, tag_i of tags"
li
ref-tip :git_ref="tag" :commit="commit"
pre {{ tag_details[tag_i] }}
.row.gap-5.wrap
git-action-button v-for="action of tag_actions(tag.name)" :git_action="action"

Expand Down

0 comments on commit a2cc721

Please sign in to comment.