New Workflow For Adding New Issues To IR Project#2093
Conversation
Add workflow to automatically add new issues to Industrial Resources project.
There was a problem hiding this comment.
Pull Request Overview
This pull request introduces a new GitHub Actions workflow to automatically add newly opened issues to a specific GitHub Project. The workflow uses the GitHub CLI to interact with the GraphQL API and handles the process of retrieving issue IDs and adding them to the project.
- Automated issue management by adding new issues to a GitHub Project upon creation
- GraphQL API integration using GitHub CLI for issue and project operations
- Proper permissions configuration for issue and content access
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| } | ||
| ' --jq '.data.resource.id') | ||
|
|
||
| PROJECT_ID="VT_abcdefgh1234567890" |
There was a problem hiding this comment.
The PROJECT_ID is hardcoded with what appears to be a placeholder value. This should be moved to a repository secret or environment variable to make the workflow reusable and secure.
| } | ||
| } | ||
| ' --jq '.data.resource.id') | ||
|
|
There was a problem hiding this comment.
The workflow lacks error handling for the GraphQL queries. If the first query fails to retrieve the ISSUE_ID, the subsequent mutation will fail silently or with unclear errors. Consider adding error checking after each GraphQL operation.
| if [[ -z "$ISSUE_ID" ]]; then | |
| echo "Error: Failed to retrieve ISSUE_ID from GraphQL query." | |
| exit 1 | |
| fi | |
This pull request introduces a new GitHub Actions workflow to automate adding newly opened issues to a specific GitHub Project. The workflow is triggered whenever an issue is opened and uses the GitHub CLI to add the issue to the designated project.
Automation and workflow enhancements:
.github/workflows/add-issue-to-project.ymlthat automatically adds newly opened issues to a GitHub Project using GitHub Actions and the GitHub CLI.