Skip to content

Commit 1def60f

Browse files
committed
add documentation
1 parent 4044b31 commit 1def60f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

codersdk/workspacebuilds.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,15 @@ const (
2222
type BuildReason string
2323

2424
const (
25+
// "initiator" is used when a workspace build is triggered by a user.
26+
// Combined with the initiator id/username, it indicates which user initiated the build.
2527
BuildReasonInitiator BuildReason = "initiator"
28+
// "autostart" is used when a build to start a workspace is triggered by Autostart.
29+
// The initiator id/username in this case is the workspace owner and can be ignored.
2630
BuildReasonAutostart BuildReason = "autostart"
27-
BuildReasonAutostop BuildReason = "autostop"
31+
// "autostop" is used when a build to stop a workspace is triggered by Autostop.
32+
// The initiator id/username in this case is the workspace owner and can be ignored.
33+
BuildReasonAutostop BuildReason = "autostop"
2834
)
2935

3036
// WorkspaceBuild is an at-point representation of a workspace state.

0 commit comments

Comments
 (0)