From 0f0e66f57e52231b455b69bd04560418b2cc850f Mon Sep 17 00:00:00 2001 From: Roger Barker Date: Thu, 24 Apr 2025 09:21:01 -0500 Subject: [PATCH] chore: Update README.md and remove scripts/* Signed-off-by: Roger Barker --- README.md | 4 ++- scripts/generate-custom-properties-schema.sh | 32 -------------------- 2 files changed, 3 insertions(+), 33 deletions(-) delete mode 100755 scripts/generate-custom-properties-schema.sh diff --git a/README.md b/README.md index 8a79b1b..359db86 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ jobs: --- -## Example custom_props.json +## Example `.github/custom_props.json` `custom_props.json`: @@ -110,6 +110,8 @@ jobs: } ``` +For help generating your `custom-props.json` file see the documentation for our tool [generate-custom-properties](https://github.com/PandasWhoCode/generate-custom-properties-schema). + ## 👤 Author Roger Barker diff --git a/scripts/generate-custom-properties-schema.sh b/scripts/generate-custom-properties-schema.sh deleted file mode 100755 index 5fb1f41..0000000 --- a/scripts/generate-custom-properties-schema.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash - -generate_custom_props_file() { - - while getopts ":ho:r:n:" opt; do - case $opt in - o) ORG="$OPTARG" ;; - n) NAME="$OPTARG" ;; - h) echo "Usage: generate_custom_props_file [-h] -o ORG [-n FILENAME]"; return 0 ;; - \?) echo "Invalid option: -$OPTARG" >&2; return 1 ;; - :) echo "Option -$OPTARG requires an argument." >&2; return 2;; - esac - done - - if [[ -z "${ORG}" ]]; then - echo "Error: Organization must be specified." >&2 - return 3 - fi - - NAME=${NAME:-"custom_props.json"} - - echo "{" > "${NAME}" - echo " \"properties\":" >> "${NAME}" - gh api /orgs/"${ORG}"/properties/schema | jq -r 'del(.[]|.["url","source_type"])' >> "${NAME}" - echo "}" >> "${NAME}" - - cat "${NAME}" | jq . > custom_props.json.tmp - mv custom_props.json.tmp "${NAME}" -} - -generate_custom_props_file "$@" -