8000 Add `reason` field for workspace builds by AbhineetJain · Pull Request #2438 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

Add reason field for workspace builds #2438

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

Merged
merged 12 commits into from
Jun 17, 2022
Prev Previous commit
Next Next commit
add documentation
  • Loading branch information
AbhineetJain committed Jun 17, 2022
commit 6fb655f88061ff36e6a62d5306d2685007b9e1ca
8 changes: 7 additions & 1 deletion codersdk/workspacebuilds.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,15 @@ const (
type BuildReason string

const (
// "initiator" is used when a workspace build is triggered by a user.
// Combined with the initiator id/username, it indicates which user initiated the build.
BuildReasonInitiator BuildReason = "initiator"
// "autostart" is used when a build to start a workspace is triggered by Autostart.
// The initiator id/username in this case is the workspace owner and can be ignored.
BuildReasonAutostart BuildReason = "autostart"
BuildReasonAutostop BuildReason = "autostop"
// "autostop" is used when a build to stop a workspace is triggered by Autostop.
// The initiator id/username in this case is the workspace owner and can be ignored.
BuildReasonAutostop BuildReason = "autostop"
)

// WorkspaceBuild is an at-point representation of a workspace state.
Expand Down
0