Skip to content

Instantly share code, notes, and snippets.

View nickboldt's full-sized avatar

Nick Boldt nickboldt

View GitHub Profile
oc get pipelineruns \
-n rhdh-tenant -l 'appstudio.openshift.io/application=rhdh-plugin-catalog-1' -o json | \
jq -r '.items[] | select(.status.conditions[0].reason == "Running" or .status.conditions[0].reason == "PipelineRunPending") | select(.metadata.name | test("-on-pull-")) | .metadata.name' \
| xargs -r -n 25 -P 4 sh -c 'for pr; do tkn pipelinerun cancel "$pr" -n rhdh-tenant 2>/dev/null || \
oc delete pipelinerun "$pr" -n rhdh-tenant --wait=false 2>/dev/null; done'
@nickboldt
nickboldt / .aliases
Created May 4, 2026 13:08
gh cli for approving PRs and ignoring irrelevant test failures
alias lgtm='gh pr review -a -b "/lgtm
/approve" '
alias lgtm-override='ght;gh pr comment -b "/override \"ci/prow/e2e-ocp-helm\"
/override \"Build with Node.js\"
/override \"Test with Node.js\"
/override \"Build Image\" "'
alias merge='gh pr merge -s --auto '
# Close JIRAs recursively
use `jira` commandline to close Feature <link> with comment "Closing as won't do.";
then look at child Epic tasks under that issue and close them too, with the same comment;
recurse into any children of those Epics and close them using the same comment too.
@nickboldt
nickboldt / gist:af35ecbde6e51ac487afffec824bc451
Last active April 16, 2026 18:56
limiting mem bloated by cursor
alias cur='sudo ulimit -v 62914560 && cursor'
other approaches: https://search.brave.com/search?q=limit+the+ram+use+by+cursor+on+lnux&summary=1&conversation=08f722cccea181c2fa2ce5e51198b466f648
@nickboldt
nickboldt / checkStage.sh
Created February 27, 2026 15:52
validate OCI artifact pushes to stage
# log in to registry
RASRC_REGISTRY="registry.***"
RASRC_USER="***"
RASRC_PWD="**********"
echo -n "[INFO]: Log into $RASRC_REGISTRY ... "
echo "${RASRC_PWD}" | skopeo login -u="${RASRC_USER}" --password-stdin ${RASRC_REGISTRY}
# run konflux push
./build/scripts/kfuxRelease.sh -v 1.9.0 --plugin --stage --debug --regex orchestrator
@nickboldt
nickboldt / sync-midstream-flowchart.cursor.generated.slop.md
Created January 9, 2026 14:36
data flow for sync-midstream.sh in rhdh-plugin-catalog repo

sync-midstream.sh Flowchart

This document explains the major steps, script calls, and data flows in the sync-midstream.sh script.


High-Level Overview

─────────────────────────────────────────────────────────────────────────
@nickboldt
nickboldt / compare_support_metadata.py
Created December 18, 2025 14:21
compare CSV dump of Ben's working sheet with the current reality in the catalog-entities folder downstream
#!/usr/bin/env python3
"""
Compare support and provider metadata between CSV file and YAML files.
Auto-updates YAML files when CSV says "community supported" (requires --edit flag).
"""
import argparse
import csv
import os
import yaml
@nickboldt
nickboldt / roadie plugin tsc problems.md
Created December 2, 2025 14:33
roadie plugin tsc errors
cd workspaces/roadie-backstage-plugins
yarn install; yarn tsc:full && yarn build:all

...

Found 122 errors in 42 files.
@nickboldt
nickboldt / dead-branches.sh
Created November 27, 2025 16:48
remove dead branches
git fetch -a; \
for branch in $(git branch -a -r | grep -v rhdh-1 | sed -r -e "s|.+origin/||"); do \
echo $branch; git push origin :${branch}; git branch -D ${branch}; \
done; \
for branch in $(git branch -a -r | grep -E -v "origin/rhdh-1.*-rhel-9" | grep rhdh-1 | sed -r -e "s|.+origin/||"); do \
echo $branch; git push origin :${branch}; git branch -D ${branch}; \
done
@nickboldt
nickboldt / cursor prompt
Last active November 19, 2025 18:58
convert dynamic-plugins.default.yaml into a list of packages, from which we can then later recreate the dynamic-plugins.default.yaml using the latest pluginConfig content
Step 1: create a copy of ``dynamic-plugins.default.yaml` called `default.packages.yaml`
This file will remove all the pluginConfig content and keep only the `plugins[].package` content. Those plugins should then be moved into two arrays,
`packages.enabled[]` and `packages.disabled[], under which we will list the `package` values.
Step 2: using the list of packages, sorted into enabled and disabled groups in the new `default.packages.yaml` file, we now need to convert those package path values to actual package references.
For each `package` that refers to a path under `./dynamic-plugins/dist/`,
compute the associated package name from the related path under `dynamic-plugins/wrappers/` to get