-
Notifications
You must be signed in to change notification settings - Fork 0
Consolidate actionable review feedback from PRs #26, #6, and #13 #37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Copilot
wants to merge
8
commits into
copilot/explain-advanced-git-commands
Choose a base branch
from
copilot/review-pending-pull-requests
base: copilot/explain-advanced-git-commands
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Consolidate actionable review feedback from PRs #26, #6, and #13 #37
Copilot
wants to merge
8
commits into
copilot/explain-advanced-git-commands
from
copilot/review-pending-pull-requests
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit applies all actionable review feedback from multiple pending PRs: ## PR #26 - Console.log redirect and type improvements - Added console.log redirect to stderr in main() to prevent MCP protocol conflicts - Used unknown[] instead of any[] for type safety - Refactored fetchMentions() to use URLSearchParams for cleaner URL construction - Added lastMentionId tracking for efficient pagination - Added Array.isArray guard in fetchThread() for safer data handling - Changed parseThread() to use proper typed parameters and copy array before sort ## PR #6 - Pass mention post ID for accurate replies - Added mentionPostId parameter to analyzeAndDecide() and simulateAnalysis() - Updated all callers to pass mention.post.id - Fixed response.json() type with proper type assertion - Fixed parseGrokResponse to use mentionPostId instead of root_post.id - Updated examples.ts to pass mention.post.id ## PR #13 - GitHub Actions workflows with review feedback - Created .github/workflows/auto-label.yml for PR auto-labeling - Created .github/workflows/pr-checks.yml for CI builds - Created .github/workflows/issue-triage.yml for automatic issue triage - Created .github/labeler.yml configuration for auto-labeling - All workflows use secure permissions and latest action versions ## Additional improvements from review feedback - Added MAX_PROCESSED_MENTIONS constant (10000) to prevent unbounded memory growth - Reversed mention processing order (oldest-first) for better chronological handling - Added safe pruning logic using iterator pattern to cap Set size - Improved type safety throughout with unknown[] and proper type assertions All changes compile successfully with TypeScript. No tests to run.
- Extract max_results as MAX_MENTIONS_PER_FETCH constant in XAPIClient - Add clarifying comment about Set insertion-order iteration in pruning logic
- Use decremented for-loop instead of array copy + reverse for efficiency - Simplify pruning logic with Array.from().slice() for better readability
- Remove redundant patterns (*.json already covers tsconfig.json, src/** covers all TypeScript files) - Scope workflows pattern to .github/ directory only to avoid false positives
- Add optional chaining check for data[0]?.id in lastMentionId tracking - Use optional chaining for error status check in issue-triage workflow
- Use **/*.json to match JSON files in any directory - Use **/.env* to match .env files in any directory
Co-authored-by: groupthinking <[email protected]>
Copilot
AI
changed the title
[WIP] Update pending PRs by implementing suggestions and corrections
Consolidate actionable review feedback from PRs #26, #6, and #13
Feb 9, 2026
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Multiple PRs (#26, #6, #13) have been stuck open with unaddressed review feedback. This PR applies their changes with all review comments resolved, so those PRs can be closed.
PR #26 — Runtime bug fixes + review feedback
console.log→stderrto avoid MCP StdioServerTransport stdout collision; useunknown[]notany[]lastMentionIdassince_idviaURLSearchParamsinstead of string concatenationfetchThreadwithArray.isArray()before passing toparseThreadparseThread: typedunknownindex signature,[...tweets].sort()to avoid in-place mutationprocessedMentionsSet at 10K with iterator-based pruning (oldest-first):PR #6 — Reply targeting fix + review feedback
analyzeAndDecide(mention, thread, mentionPostId)— replies now target the mention post, not the conversation rootanyagent.ts,examples.ts)PR #13 — GitHub Actions workflows + review feedback
auto-label.yml: usespull_request_target(works on forks),sync-labels: true, no duplicatewith:keypr-checks.yml:pull-requests: writepermission (fixesResource not accessible by integration)issue-triage.yml: createsneeds-triagelabel if missing before applying itlabeler.yml: correct YAML structure with**/*.ymlglob patterns✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.