-
Notifications
You must be signed in to change notification settings - Fork 231
Description
Skill Overview
Create a reusable shared component for fetching GitHub Discussions data with caching, following the successful pattern established by shared/issues-data-fetch.md, shared/copilot-session-data-fetch.md, and the proposed shared/pr-data-fetch.md.
Several workflows analyze GitHub Discussions for reporting, searching, and task mining. These workflows currently implement their own discussions fetching logic. A shared component would standardize discussions data access and reduce duplication by approximately 200 lines.
Current Usage
This skill pattern appears in at least 5+ workflows that fetch or analyze discussions:
-
discussion-task-miner.md- Mines discussions for actionable tasks -
daily-issues-report.md- Includes discussions in comprehensive reports (usestoolsets: [default, discussions]) -
weekly-issue-summary.md- Summarizes issues and discussions -
daily-fact.md- Posts to discussions (usestoolsets: [default, discussions]) -
auto-triage-issues.md- Creates discussion reports (usestoolsets: [default, discussions])
Proposed Shared Component
File: .github/workflows/shared/discussions-data-fetch.md
Note: This shared component already exists at .github/workflows/shared/discussions-data-fetch.md but may need enhancement for broader adoption.
Current Configuration Review Needed:
---
# Need to verify if this exists and is well-documented
tools:
cache-memory:
key: discussions-data
bash:
- "gh api *"
- "jq *"
- "/tmp/gh-aw/jqschema.sh"
- "mkdir *"
- "date *"
- "cp *"
steps:
- name: Fetch discussions data
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Similar pattern to issues-data-fetch.md
# Fetch discussions using GitHub GraphQL API
# Cache with today's date
# Generate schema
...
---Implementation Plan
- Verify existing component: Check if
shared/discussions-data-fetch.mdexists and review its implementation - If exists: Enhance documentation and usage examples
- If doesn't exist: Create following the established pattern
- Add clear usage documentation with jq filtering examples
- Update
discussion-task-miner.mdto use the shared component - Update
daily-issues-report.mdto use the shared component - Progressively migrate other workflows (3+ more)
- Add to AGENTS.md as a reference for future workflows
Discovery Required
Before implementation, verify:
- Does
shared/discussions-data-fetch.mdalready exist? - If yes, is it actively used by workflows?
- What's the quality of the existing implementation?
- Does it follow the same caching pattern as issues-data-fetch.md?
Impact
- Lines saved: ~200 lines across 5+ workflows
- Maintenance benefit: Centralizes discussions data fetching
- Consistency: Standardizes discussions data structure across workflows
- Performance: Shared caching reduces API calls
Usage Example
imports:
- shared/jqschema.md # Required dependency
- shared/discussions-data-fetch.mdFiltering Examples:
# Count total discussions
jq 'length' /tmp/gh-aw/discussions-data/discussions.json
# Filter by category
jq '[.[] | select(.category.name == "General")]' /tmp/gh-aw/discussions-data/discussions.json
# Filter by date range
jq --arg date "$(date -d '7 days ago' -Iseconds)" \
'[.[] | select(.createdAt > $date)]' /tmp/gh-aw/discussions-data/discussions.jsonPriority Note
PRIORITY: MEDIUM - This is lower priority than PR data fetch and workflow runs fetch because:
- May already exist (needs verification)
- Fewer workflows need discussions data compared to PRs or workflow runs
- Discussions API is more complex (GraphQL) and might benefit from specialized handling
Related Analysis
This recommendation comes from the Workflow Skill Extractor analysis run on 2026-02-04 analyzing 145 workflows and 58 existing shared components.
AI generated by Workflow Skill Extractor
- expires on Feb 7, 2026, 12:06 AM UTC