Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .github/workflows/copilot-pr-prompt-analysis.lock.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions .github/workflows/copilot-pr-prompt-analysis.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ steps:
gh search prs --repo ${{ github.repository }} \
--author "app/copilot" \
--created ">=$DATE_30_DAYS_AGO" \
--json number,title,state,createdAt,closedAt,mergedAt,author,body,labels,url,assignees,repository \
--json number,title,state,createdAt,closedAt,author,body,labels,url,assignees,repository \
--limit 1000 \
> /tmp/gh-aw/pr-data/copilot-prs.json

Expand Down Expand Up @@ -116,17 +116,19 @@ For each PR in the dataset:
- Handle cases where body is null or empty

2. **Categorize the PR outcome**:
- **Merged**: `mergedAt` is not null
- **Closed (not merged)**: `state` is "CLOSED" and `mergedAt` is null
- **Note**: The `gh search prs` command doesn't return `mergedAt` in its JSON output
Copy link

Copilot AI Oct 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected backtick usage: should use backticks around the command name for consistency with other code references in the document.

Copilot uses AI. Check for mistakes.
- To determine merge status, you'll need to use `gh pr view <number> --json mergedAt` for each PR
Copy link

Copilot AI Oct 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The documentation instructs to check merge status for 'each PR', but this could be inefficient for large datasets (up to 1000 PRs). Consider adding a note about potential performance implications or suggesting batch processing strategies to avoid rate limiting.

Suggested change
- To determine merge status, you'll need to use `gh pr view <number> --json mergedAt` for each PR
- To determine merge status, you'll need to use `gh pr view <number> --json mergedAt` for each PR
- ⚠️ **Performance Note**: For large datasets (hundreds or thousands of PRs), checking merge status for each PR individually can be inefficient and may lead to GitHub API rate limiting. Consider batching requests, using the GitHub REST API to fetch multiple PRs at once, or limiting the number of PRs processed in a single run.

Copilot uses AI. Check for mistakes.
- **Merged**: Use `gh pr view` to check if `mergedAt` is not null
- **Closed (not merged)**: `state` is "CLOSED" and PR was not merged
- **Open**: `state` is "OPEN"

3. **Extract key information**:
- PR number and URL
- PR title
- Full prompt text from body
- Outcome category (Merged/Closed/Open)
- Outcome category (Merged/Closed/Open) - requires additional `gh pr view` calls
- Creation date
- Merge/close date (if applicable)
- Merge/close date (if applicable) - use `gh pr view <number> --json mergedAt,closedAt` to get these

### Phase 3: Analyze Prompt Patterns

Expand Down
Loading