feat: add optional coder-username input for automated workflows#7
Merged
feat: add optional coder-username input for automated workflows#7
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.
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
reviewed
Jan 16, 2026
johnstcn
approved these changes
Jan 16, 2026
Member
johnstcn
left a comment
There was a problem hiding this comment.
Some nits, but otherwise LGTM 👍
…ing union instead
f310ab9 to
9afea81
Compare
Contributor
Author
|
@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. 😸 |
johnstcn
approved these changes
Jan 16, 2026
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
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.
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.