Skip to content

Commit b8cba98

Browse files
committed
cleanup script, no major changes
Signed-off-by: Andrew Brandt <[email protected]>
1 parent 70e08bd commit b8cba98

File tree

1 file changed

+25
-26
lines changed

1 file changed

+25
-26
lines changed

action.yaml

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
name: 'Read Custom Properties of All Repos in Organization'
1+
name: 'Read Custom Properties of All Repos in an Organization'
22
description: 'Read all the custom properties and values of all repos in an organization'
3-
author: 'Andrew Brandt <andrew.brandt@hashgraph.com>'
3+
author: 'Andrew Brandt <andrew.brandt@pandaswhocode.com>'
44
organization: 'PandasWhoCode'
55
branding:
66
icon: 'check-circle'
@@ -30,7 +30,6 @@ inputs:
3030
runs:
3131
using: "composite"
3232
steps:
33-
3433
- name: Install yq (mikefarah's version)
3534
shell: bash
3635
run: |
@@ -50,26 +49,23 @@ runs:
5049
gh api --paginate "orgs/$ORG_NAME/repos" --jq '.[].name' > repo-list.txt
5150
echo "Repos written to repo-list.txt"
5251
53-
- name: Extract property names into a JSON array
52+
- name: Extract property names into a JSON file
5453
shell: bash
5554
env:
5655
GH_TOKEN: ${{ inputs.token }} # or use your PAT if needed
5756
run: |
5857
ORG=$(cat org-name.txt)
5958
echo "Fetching property schema for org: $ORG"
60-
61-
gh api --paginate "orgs/$ORG/properties/schema" \
62-
| jq 'map(.property_name)' > property-names.json
63-
59+
gh api --paginate "orgs/$ORG/properties/schema" | jq 'map(.property_name)' > property-names.json
6460
echo "Property names written to property-names.json"
6561
66-
- name: Print out all repos in file
67-
shell: bash
68-
run: |
69-
echo "Org name is:"
70-
cat org-name.txt
71-
echo "Full list of repos in org:"
72-
cat repo-list.txt
62+
# - name: Print out all repos in file
63+
# shell: bash
64+
# run: |
65+
# echo "Org name is:"
66+
# cat org-name.txt
67+
# echo "Full list of repos in org:"
68+
# cat repo-list.txt
7369

7470
- name: Fetch custom properties for each repo
7571
shell: bash
@@ -98,17 +94,19 @@ runs:
9894
9995
echo "Custom properties written to read-repo-properties.json"
10096
101-
- name: Print out the full read-repo-properties.json file
102-
shell: bash
103-
run: |
104-
echo "Full read-repo-properties.json file is:"
105-
cat read-repo-properties.json
97+
# - name: Print out the full read-repo-properties.json file
98+
# shell: bash
99+
# run: |
100+
# echo ""
101+
# echo "Full read-repo-properties.json file is:"
102+
# cat read-repo-properties.json
103+
# echo ""
106104

107-
- name: Confirm the template file exists
108-
shell: bash
109-
run: |
110-
echo "The template file for JSON output is:"
111-
cat property-names.json
105+
# - name: Confirm the template file exists
106+
# shell: bash
107+
# run: |
108+
# echo "The template file for JSON output is:"
109+
# cat property-names.json
112110

113111
- name: Convert repo properties to YAML using template
114112
shell: bash
@@ -146,8 +144,10 @@ runs:
146144
- name: Print out the read-repo-properties.yaml
147145
shell: bash
148146
run: |
147+
echo ""
149148
echo "Full read-repo-properties.yaml file is:"
150149
cat read-repo-properties.yaml
150+
echo ""
151151
152152
- name: Overwrite existing file (if applicable)
153153
if: ${{ inputs.overwrite-existing-file == 'true' }}
@@ -166,4 +166,3 @@ runs:
166166
git add repo-properties.yaml
167167
git commit -m "chore: commit repo custom properties to properties file" || echo "Nothing to commit"
168168
git push
169-

0 commit comments

Comments
 (0)