-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add optional coder-username input for automated workflows #7
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
Conversation
Allow tasks to be created under a specific Coder user without requiring a GitHub user ID lookup. This enables automated workflows (e.g., CI bots, scheduled jobs) to run tasks under a service account. - Add coder-username input, make github-user-id optional - Skip API lookup when username is provided directly - Either coder-username or github-user-id must be provided
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 adds an optional coder-username input parameter to enable automated workflows (e.g., CI bots, scheduled jobs) to create tasks under a specific Coder user without requiring a GitHub user ID lookup.
Changes:
- Made
github-user-idoptional and addedcoder-usernameas a new optional input - Updated the action logic to prefer
coder-usernamewhen provided, falling back to GitHub user ID lookup - Added validation to ensure at least one of the two identification methods is provided
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/schemas.ts | Made githubUserID and coderUsername optional in the schema with a comment noting validation happens in action.ts |
| src/index.ts | Updated input parsing to handle optional github-user-id and new coder-username input |
| src/action.ts | Added conditional logic to use coder-username directly or lookup via github-user-id, with error handling for missing both |
| src/action.test.ts | Added two new tests: one for using coder-username without github-user-id, and one verifying coder-username preference when both are provided |
| action.yaml | Updated input descriptions to reflect new optional nature and added coder-username input definition |
| dist/index.js | Compiled JavaScript output reflecting all source code changes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
johnstcn
left a comment
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.
Some nits, but otherwise LGTM 👍
…ing union instead
f310ab9 to
9afea81
Compare
|
@johnstcn whenever you get a chance take a look at the union and make sure everything looks good to you, but I think we are good to go here. 😸 |
Allow tasks to be created under a specific Coder user without requiring a GitHub user ID lookup. This enables automated workflows (e.g., CI bots, scheduled jobs) to run tasks under a service account.