feat: store json file listing all branches#468
feat: store json file listing all branches#468gegoune wants to merge 4 commits intoconcourse:masterfrom
Conversation
|
taylorsilva
left a comment
There was a problem hiding this comment.
Hey, so not exactly sure what shape you're hoping this takes. This is what I'm seeing and thinking so far.
It looks like we can scope this change to just the in script (get step) of the resource. Looks like you're suggesting adding a new param called all_branches. You'll want to add that here: https://github.com/concourse/git-resource/blob/master/assets/in_schema.json
and then pull in the value of that here:
Lines 52 to 75 in 917f8c5
all_branches=$(jq -r '(.params.all_branches // false)' <<< "$payload")You'll also want to add all_branches to this table in the README:
Lines 399 to 406 in 917f8c5
Off the top of my head I'm not sure what git command(s) you would need to run to get all branches. Looks like we store and fetch most of the metadata info at the end of the script:
Lines 266 to 299 in 917f8c5
Hope that helps!
9db4b01 to
acb7ab5
Compare
I meant to add a list of all branches to that file, not the value of already existing Quick local test (git standalone git, no concourseci) it looks like git clone without $ git clone git@github.com:concourse/concourse.git
Cloning into 'concourse'...
remote: Enumerating objects: 216047, done.
remote: Counting objects: 100% (804/804), done.
remote: Compressing objects: 100% (417/417), done.
remote: Total 216047 (delta 453), reused 436 (delta 386), pack-reused 215243 (from 3)
Receiving objects: 100% (216047/216047), 150.54 MiB | 10.06 MiB/s, done.
Resolving deltas: 100% (157499/157499), done.
$ git for-each-ref --no-omit-empty refs/remotes/ --format='%(refname:lstrip=3)'
HEAD
add-defaults
alg-tracing
bug/6215-no-version-abort-rerun-build
centralize-api-routes
containerd-bump-7.4
containerd-default-namespace
containerd-timeouts
disable-microsoft-user
first-occ-query
fix-k8s-topgun-panic-6.7
get-var
get-var-2
goccy-yaml
improve-interp
issue/5418
issue/7697
issue/8215-bump-cloudfoundry-deps
issue/942
log-ip-address
masked-and-readonly-mounts
master
name-claim
origin/issue/6627-ldap-password
pure-go-zstd-fixed
refactor-metrics
release/5.2.x
release/5.5.x
release/5.7.x
release/5.8.x
release/6.1.x
release/6.2.x
release/6.3.x
release/6.4.x
release/6.5.x
release/6.6.x
release/6.7.x
release/6.8.x
release/7.0.x
release/7.1.x
release/7.10.x
release/7.11.x
release/7.12.x
release/7.13.x
release/7.14.x
release/7.2.x
release/7.3.x
release/7.4.x
release/7.5.x
release/7.6.x
release/7.7.x
release/7.8.x
release/7.9.x
release/8.0.x
remove-check-sessions
renovate/all
resource-check-timeout
resource-ui-polish
revert-containerd-1.6.0
shared-webhooks
topgun-fix
upstream-sync-dex
using-upstream-dex
watch-endpoints
wip-algorithm-v3
worker-overload/8317then $ git for-each-ref --format='%(refname:lstrip=3)' refs/remotes/ | jq --raw-input --slurp --compact-output 'split("\n")[:-1]'
["HEAD","add-defaults","alg-tracing","bug/6215-no-version-abort-rerun-build","centralize-api-routes","containerd-bump-7.4","containerd-default-namespace","containerd-timeouts","disable-microsoft-user","first-occ-query","fix-k8s-topgun-panic-6.7","get-var","get-var-2","goccy-yaml","improve-interp","issue/5418","issue/7697","issue/8215-bump-cloudfoundry-deps","issue/942","log-ip-address","masked-and-readonly-mounts","master","name-claim","origin/issue/6627-ldap-password","pure-go-zstd-fixed","refactor-metrics","release/5.2.x","release/5.5.x","release/5.7.x","release/5.8.x","release/6.1.x","release/6.2.x","release/6.3.x","release/6.4.x","release/6.5.x","release/6.6.x","release/6.7.x","release/6.8.x","release/7.0.x","release/7.1.x","release/7.10.x","release/7.11.x","release/7.12.x","release/7.13.x","release/7.14.x","release/7.2.x","release/7.3.x","release/7.4.x","release/7.5.x","release/7.6.x","release/7.7.x","release/7.8.x","release/7.9.x","release/8.0.x","remove-check-sessions","renovate/all","resource-check-timeout","resource-ui-polish","revert-containerd-1.6.0","shared-webhooks","topgun-fix","upstream-sync-dex","using-upstream-dex","watch-endpoints","wip-algorithm-v3","worker-overload/8317"]I have removed My idea is to use that output with |
No description provided.