-
Notifications
You must be signed in to change notification settings - Fork 78
Update the project workflow #136
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
base: mempool
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR expands the GitHub Actions workflow from only setting PR review status to a comprehensive project board automation system that handles both pull requests and issues.
Changes:
- Adds automatic addition of newly opened issues to project board #8
- Implements draft PR detection to skip status updates for draft pull requests
- Renames workflow and job to reflect broader scope
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const alreadyInProject = errors.some(e => | ||
| typeof e.message === 'string' && | ||
| e.message.toLowerCase().includes('already') && | ||
| e.message.toLowerCase().includes('project') | ||
| ); |
Copilot
AI
Jan 28, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error detection logic for "already in project" is fragile because it relies on string matching against error messages that may vary or change. The logic checks if both "already" and "project" appear in the error message, which could produce false positives. Consider checking for more specific error codes or types if available in the GitHub GraphQL API error responses, or at minimum use a more precise error message pattern.
| const alreadyInProject = errors.some(e => | |
| typeof e.message === 'string' && | |
| e.message.toLowerCase().includes('already') && | |
| e.message.toLowerCase().includes('project') | |
| ); | |
| const alreadyInProject = errors.some(e => { | |
| if (typeof e.message !== 'string') return false; | |
| const msg = e.message.toLowerCase(); | |
| return msg.includes('already exists in project') || | |
| msg.includes('content already exists in project'); | |
| }); |
| contentId: context.payload.issue.node_id | ||
| }); | ||
|
|
||
| console.log('Successfully added issue to project #8'); |
Copilot
AI
Jan 28, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hardcoded project number "8" in the console log message is inconsistent with using PROJECT_ID from secrets. If the project number changes or this workflow is reused for a different project, the log message will be misleading. Consider using a variable or more generic message.
| ); | ||
|
|
||
| if (alreadyInProject) { | ||
| console.log('Issue is already in project #8, skipping add.'); |
Copilot
AI
Jan 28, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hardcoded project number "8" in the console log message is inconsistent with using PROJECT_ID from secrets. If the project number changes or this workflow is reused for a different project, the log message will be misleading. Consider using a variable or more generic message.
| if (alreadyInProject) { | ||
| console.log('Issue is already in project #8, skipping add.'); | ||
| } else { | ||
| console.error('Failed to add issue to project #8:', error); |
Copilot
AI
Jan 28, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The hardcoded project number "8" in the console log message is inconsistent with using PROJECT_ID from secrets. If the project number changes or this workflow is reused for a different project, the log message will be misleading. Consider using a variable or more generic message.
One more