Skip to content

Commit e05ae1c

Browse files
authored
Only track commits on main branch in never alone (#431)
1 parent d6c930b commit e05ae1c

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

bin/never_alone/create_never_alone_trail.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,8 @@ function attest_never_alone_trail_to_parent
258258
function main
259259
{
260260
check_arguments "$@"
261-
# Use gh instead of git so we can keep the commit depth of 1. The order are from oldest commit to newest
262-
local -r commits=($(gh api repos/:owner/:repo/compare/${START_COMMIT_SHA}...${END_COMMIT_SHA} -q '.commits[].sha'))
261+
# Only get commits on main branch.
262+
local -r commits=($(git rev-list --first-parent ${START_COMMIT_SHA}...${END_COMMIT_SHA}))
263263

264264
begin_trail_with_template ${FLOW_NAME} ${TRAIL_NAME} "${commits[@]}"
265265

release-flow-template.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ trail:
55
type: generic
66
- name: test
77
type: junit
8-
- name: snyk-code
9-
type: snyk
8+
# - name: snyk-code
9+
# type: snyk
10+
- name: never-alone-trail
11+
type: generic
1012
artifacts:
1113
- name: cli-docker
1214
attestations:

0 commit comments

Comments
 (0)