mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-23 02:11:01 +00:00
Show icon and index of a pull request in pipelines triggered by pull requests (#575)
Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
parent
db2fbc699a
commit
fe2f269bce
2 changed files with 10 additions and 3 deletions
|
@ -33,7 +33,10 @@
|
||||||
<Icon v-else-if="build.event === 'deployment'" name="deployment" />
|
<Icon v-else-if="build.event === 'deployment'" name="deployment" />
|
||||||
<Icon v-else-if="build.event === 'tag'" name="tag" />
|
<Icon v-else-if="build.event === 'tag'" name="tag" />
|
||||||
<Icon v-else name="push" />
|
<Icon v-else name="push" />
|
||||||
<span class="truncate">{{ build.branch }}</span>
|
<span v-if="build.event === 'pull_request'" class="truncate">{{
|
||||||
|
`#${build.ref.replaceAll('refs/pull/', '').replaceAll('/merge', '').replaceAll('/head', '')}`
|
||||||
|
}}</span>
|
||||||
|
<span v-else class="truncate">{{ build.branch }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex space-x-2 items-center">
|
<div class="flex space-x-2 items-center">
|
||||||
<Icon name="commit" />
|
<Icon name="commit" />
|
||||||
|
|
|
@ -35,11 +35,15 @@
|
||||||
<Icon v-else-if="build.event === 'deployment'" name="deployment" />
|
<Icon v-else-if="build.event === 'deployment'" name="deployment" />
|
||||||
<Icon v-else-if="build.event === 'tag'" name="tag" />
|
<Icon v-else-if="build.event === 'tag'" name="tag" />
|
||||||
<Icon v-else name="push" />
|
<Icon v-else name="push" />
|
||||||
<span>{{ build.branch }}</span>
|
<a v-if="build.event === 'pull_request'" class="text-link" :href="build.link_url" target="_blank">{{
|
||||||
|
`#${build.ref.replaceAll('refs/pull/', '').replaceAll('/merge', '').replaceAll('/head', '')}`
|
||||||
|
}}</a>
|
||||||
|
<span v-else>{{ build.branch }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex space-x-2 items-center">
|
<div class="flex space-x-2 items-center">
|
||||||
<Icon name="commit" />
|
<Icon name="commit" />
|
||||||
<a class="text-link" :href="build.link_url" target="_blank">{{ build.commit.slice(0, 10) }}</a>
|
<span v-if="build.event === 'pull_request'">{{ build.commit.slice(0, 10) }}</span>
|
||||||
|
<a v-else class="text-link" :href="build.link_url" target="_blank">{{ build.commit.slice(0, 10) }}</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex space-x-2 items-center">
|
<div class="flex space-x-2 items-center">
|
||||||
<Icon name="since" />
|
<Icon name="since" />
|
||||||
|
|
Loading…
Reference in a new issue