From olm-team
Monitors open Enhancement PRs in the openshift/enhancements repository, filters out OLM team members, scores PRs for OLM relevance, and returns up to 3 impactful proposals.
How this command is triggered — by the user, by Claude, or both
Slash command
/olm-team:ep-watchThe summary Claude sees in its command listing — used to decide when to auto-load this command
## Name olm-team:ep-watch ## Synopsis ## Description The `olm-team:ep-watch` command watches open Enhancement Proposal PRs in the openshift/enhancements repository that are **not created by the OLM team** but may have impacts on OLM work. This helps the OLM team maintain visibility into what other teams are designing that could affect operator lifecycle management. The command: - Fetches open PRs from openshift/enhancements repository - Filters out PRs created by known OLM team members - Analyzes PR content for OLM-related topics - Returns up to 3 most relevant PRs with impact assessmen...
olm-team:ep-watch
/olm-team:ep-watch
The olm-team:ep-watch command watches open Enhancement Proposal PRs in the openshift/enhancements repository that are not created by the OLM team but may have impacts on OLM work. This helps the OLM team maintain visibility into what other teams are designing that could affect operator lifecycle management.
The command:
This is useful for:
Create a list of topics that could impact OLM:
High Priority Topics (Weight: 10): OLMv1-specific terms that indicate direct relevance:
Medium Priority Topics (Weight: 5): OLM-specific but broader terms:
Low Priority Topics (Weight: 3): Related terms that must appear in specific context:
Excluded Generic Terms: To reduce false positives, the following generic terms are NOT searched:
Define list of known OLM team members (GitHub usernames):
OLM_TEAM_MEMBERS = [
"grokspawn",
"joelanford",
"perdasilva",
"tmshort",
"oceanc80",
"dtfranz",
"anik120",
"rashmigottipati",
"pedjak",
"ankitathomas",
"trgeiger",
# Add current OLM team members as needed
]
Use GitHub API to get open PRs:
# Fetch open PRs from openshift/enhancements
curl -s \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token $GITHUB_TOKEN" \
"https://api.github.com/repos/openshift/enhancements/pulls?state=open&per_page=100" \
> /tmp/enhancement-prs.json
For each open PR:
Filter out OLM team PRs
Score relevance
Extract key information
Sort PRs by relevance score and return top 3.
🔍 Found X open Enhancement PRs from other teams that may impact OLM
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📋 PR #XXXX: [Title]
👤 Author: @username (Team: [team-name if identifiable])
📅 Opened: X days ago
🎯 Relevance: [HIGH/MEDIUM]
**Why this matters to OLM:**
- Mentions: [list of matched topics]
- Potential impacts: [brief analysis]
**Files changed:**
- enhancements/[area]/[filename].md
🔗 https://github.com/openshift/enhancements/pull/XXXX
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
For each PR, suggest:
Basic usage:
/olm-team:ep-watch
Example output:
🔍 Found 12 open Enhancement PRs from other teams, showing top 3 relevant to OLM
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📋 PR #1234: Add support for operator webhooks in hypershift
👤 Author: @other-team-member (HyperShift Team)
📅 Opened: 5 days ago
🎯 Relevance: HIGH
**Why this matters to OLM:**
- Mentions: ClusterExtension, operator lifecycle, catalogd
- Potential impacts: Changes how operator webhooks work in hosted control planes
Could affect OLMv1 webhook support in HyperShift clusters
**Files changed:**
- enhancements/hypershift/operator-webhooks.md
🔗 https://github.com/openshift/enhancements/pull/1234
**Recommended action:** Review and comment on webhook integration approach
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Requires GITHUB_TOKEN for higher rate limits:
# Check for token
if [ -z "$GITHUB_TOKEN" ]; then
echo "⚠️ Warning: GITHUB_TOKEN not set. API rate limits will be restrictive."
echo "Set with: export GITHUB_TOKEN=your_token"
fi
The scoring algorithm uses weighted keywords to prioritize OLMv1-specific content:
def score_pr_relevance(pr_data, weighted_topics):
score = 0
# Each topic has a weight (10=high, 5=medium, 3=low)
for topic, weight in weighted_topics.items():
topic_lower = topic.lower()
# Title matches get 3x multiplier
if topic_lower in pr_data['title'].lower():
score += (weight * 3)
# Body matches get 1x weight
elif topic_lower in pr_data['body'].lower():
score += weight
return score
# Relevance levels:
# HIGH: score >= 30 (e.g., "olmv1" or "catalogd" in title)
# MEDIUM: score >= 10
# LOW: score < 10
# Minimum threshold: 5 (PRs with score < 5 are filtered out)
Example Scoring:
To avoid rate limits, cache results:
CACHE_FILE="/tmp/olm-ep-watch-cache.json"
CACHE_TTL=3600 # 1 hour
if [ -f "$CACHE_FILE" ]; then
# Portable stat command for macOS and Linux
if stat -f %m "$CACHE_FILE" >/dev/null 2>&1; then
# macOS/BSD
file_time=$(stat -f %m "$CACHE_FILE")
else
# Linux
file_time=$(stat -c %Y "$CACHE_FILE")
fi
age=$(($(date +%s) - file_time))
if [ $age -lt $CACHE_TTL ]; then
echo "Using cached results (${age}s old)"
cat "$CACHE_FILE"
exit 0
fi
fi
# Handle API failures
if ! response=$(curl -s -w "\n%{http_code}" "$api_url"); then
echo "❌ Failed to fetch PRs from GitHub API"
exit 1
fi
http_code=$(echo "$response" | tail -n1)
if [ "$http_code" != "200" ]; then
echo "❌ GitHub API returned status $http_code"
if [ "$http_code" = "403" ]; then
echo "Rate limit exceeded. Try again later or set GITHUB_TOKEN"
fi
exit 1
fi
GitHub CLI (optional but recommended)
which ghGITHUB_TOKEN (recommended)
export GITHUB_TOKEN=your_tokenjq (for JSON parsing)
which jqbrew install jq (macOS) or apt install jq (Linux)Internet access
The following features could be added in future versions:
Allow searching for specific topics:
/olm-team:ep-watch webhooks catalog
Return more or fewer results:
/olm-team:ep-watch --limit 5
See ALL relevant PRs (including OLM team):
/olm-team:ep-watch --include-team
gh pr list/olm-team:ep-search - Search existing Enhancement Proposalsnpx claudepluginhub jluhrsen/ai-helpers --plugin olm-team/ep-watchMonitors open Enhancement PRs in the openshift/enhancements repository, filters out OLM team members, scores PRs for OLM relevance, and returns up to 3 impactful proposals.
/pr-listLists open PRs in the current repo, prioritized by type (fix/release/feat/update), with summaries and approval counts.
/huntScans open issues and PRs, ranks them by readiness, and recommends what to work on next. Uses signed shiplog reviews to determine review status.
/pr-listLists open PRs in the current repository, ranked by priority based on conventional commit prefixes and draft status.
/pr-listDisplays open pull requests in the current repository, grouped by priority (high, medium, low) based on commit type, with title, author, elapsed time, approvals, and line changes.
/pr-listLists open PRs for the current repository, ordered by priority (high/medium/low), with summaries, review count, and elapsed time since opening.