Skip to content

Commit

Permalink
chore: synced file(s) with honestbank/.github
Browse files Browse the repository at this point in the history
  • Loading branch information
honestbank-bot committed Jan 21, 2025
1 parent a72febf commit cb57bec
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ default_install_hook_types: [ pre-commit, commit-msg ]

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: end-of-file-fixer
stages: [commit]
Expand All @@ -18,7 +18,7 @@ repos:
stages: [commit]
args: ["--allow-missing-credentials"]
- repo: https://github.com/golangci/golangci-lint
rev: v1.60.3
rev: v1.61.0
hooks:
- id: golangci-lint
stages: [commit]
Expand All @@ -29,7 +29,7 @@ repos:
- id: go-imports
stages: [commit]
- repo: https://github.com/gitguardian/ggshield
rev: v1.31.0
rev: v1.32.1
hooks:
- id: ggshield
language: python
Expand Down
18 changes: 14 additions & 4 deletions catalog-info.generator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,22 +69,30 @@ get_gh_team() {

REPO_NAME=$(basename "$(pwd)")
SERVICE_NAMES=(${(s: :)$(yq e '.jobs.repository-release-prod.with.helm_release_names' "$RELEASE_WORKFLOW")})
if [[ ${#SERVICE_NAMES[@]} == 0 || "$SERVICE_NAMES" == "null" && -f "customized_helm_release_names.txt" ]]; then
if [[ ${#SERVICE_NAMES[@]} == 0 || "$SERVICE_NAMES" == "null" || $SERVICE_NAMES == \$* ]]; then
SERVICE_NAMES=($(cat "customized_helm_release_names.txt"))
fi
if [[ ${#SERVICE_NAMES[@]} == 0 || "$SERVICE_NAMES" == "null" ]]; then
SERVICE_NAMES=(${(s: :)$(jq -r ".manual_service_names[]" $META_DATA_FILE)})
fi
if [[ ${#SERVICE_NAMES[@]} == 0 || "$SERVICE_NAMES" == "null" ]]; then
SERVICE_NAMES=($(jq --arg p "$REPO_NAME" -r 'to_entries | .[] | .value as $version | ($version | split(".")[0] | tonumber) as $major |
if $major >= 2 then
"\($p)-\(.key)-v\($major)"
else
"\($p)-\(.key)"
end' .release-please-manifest.json))
SERVICE_NAMES+=($REPO_NAME)
fi
if [[ ${#SERVICE_NAMES[@]} == 0 || "$SERVICE_NAMES" == "null" ]]; then
SERVICE_NAMES=($REPO_NAME)
fi

SQUAD_NAME=$(yq e '.jobs.repository-release-prod.with.argocd_state_repo' "$RELEASE_WORKFLOW")
SQUAD_NAME=$(echo "$SQUAD_NAME" | cut -c 14-50)
if [[ -z $SQUAD_NAME || "$SQUAD_NAME" == "null" ]]; then
if [[ -z $SQUAD_NAME || "$SQUAD_NAME" == "null" || $SQUAD_NAME == \$* ]]; then
SQUAD_NAME=$(jq -r '.squad_name' $META_DATA_FILE)
else
SQUAD_NAME="$SQUAD_NAME-squad"
SQUAD_NAME="$(echo "$SQUAD_NAME" | cut -c 14-50)-squad"
fi
SQUAD_NAME=$(get_squad_name $SQUAD_NAME)
GH_TEAM=$(get_gh_team $SQUAD_NAME)
Expand Down Expand Up @@ -121,6 +129,8 @@ for SERVICE in $SERVICE_NAMES; do
SERVICE_RUNBOOK=$(jq -r ".\"$SERVICE\".runbook" $META_DATA_FILE)
# Default dependencies
DEPENDENCIES=(${(s: :)$(jq -r ".manual_dependencies[]" $META_DATA_FILE)})
# Service specific dependencies
DEPENDENCIES+=(${(s: :)$(jq -r ".\"$SERVICE\".manual_dependencies[]?" $META_DATA_FILE)})
TOPICS=(${(s: :)$(grep Topic "config/config.go" | sed -n 's/.*default:"\([^"]*\)".*/\1/p')})
for topic in $TOPICS; do
DEPENDENCIES+=("resource:confluent-$topic")
Expand Down
2 changes: 1 addition & 1 deletion spell-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ EOF
echo "$dictionary" > dictionary.text

# Your string to check
string=$(cat $1)
string=$(cat "$1")

echo "$string"

Expand Down

0 comments on commit cb57bec

Please sign in to comment.