Skip to content

Commit 8b6b0be

Browse files
committed
chore(pipeline): more descriptive comments
1 parent bb53ec2 commit 8b6b0be

File tree

4 files changed

+14
-0
lines changed

4 files changed

+14
-0
lines changed

.github/bin/repos/filter.sh

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/usr/bin/env bash
22
set -eu
33

4+
# reads repository JSON text from stdin
45
# remove archived repositories, and the reference to this repository
6+
# print resulting JSON text to stdout
57

68
cat | jq '[.[] | select(.archived==false) | select(.name!="cal-itp.github.io")]'

.github/bin/repos/get.sh

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
#!/usr/bin/env bash
22
set -eu
33

4+
# print public Cal-ITP source repositories as JSON text to stdout
5+
# see https://docs.github.com/en/rest/reference/repos#list-organization-repositories
6+
47
curl -H "Accept: application/vnd.github.v3+json" https://api.github.com/orgs/cal-itp/repos?type=source

.github/bin/repos/pipeline.sh

+5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
#!/usr/bin/env bash
22
set -eu
33

4+
# run the repository data pipeline: get > filter > sort > output
5+
46
source=.github/bin/repos
57
target=_data/repos.json
68

79
$source/get.sh | $source/filter.sh | $source/sort.sh > "$target"
810

11+
# save resulting file name in GitHub Actions context
12+
# see https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-output-parameter
13+
914
echo "::set-output name=data_file::$target"

.github/bin/repos/sort.sh

+4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
#!/usr/bin/env bash
22
set -eu
33

4+
# reads repository JSON text from stdin
5+
# sort by lowercase name
6+
# print resulting JSON text to stdout
7+
48
cat | jq "sort_by(.name | ascii_downcase)"

0 commit comments

Comments
 (0)