Skip to content

Conversation

@DevelopmentCats
Copy link
Contributor

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

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
Copilot AI review requested due to automatic review settings January 15, 2026 22:17
Copy link

Copilot AI left a 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-id optional and added coder-username as a new optional input
  • Updated the action logic to prefer coder-username when 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.

Copy link
Member

@johnstcn johnstcn left a 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 👍

@DevelopmentCats DevelopmentCats force-pushed the cat/coder-username-optional-input branch from f310ab9 to 9afea81 Compare January 16, 2026 16:49
@DevelopmentCats
Copy link
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 johnstcn merged commit a2f4758 into main Jan 19, 2026
1 check passed
@johnstcn johnstcn deleted the cat/coder-username-optional-input branch January 19, 2026 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants