Automations
CancelWorkflowExecution
CancelWorkflowExecutionAction
CreateWorkflow
DeleteWorkflow
ListWorkflows
ListWorkflowExecutionActions
ListWorkflowExecutionOutputs
ListWorkflowExecutions
GetWorkflow
GetWorkflowExecution
GetWorkflowExecutionAction
StartWorkflow
UpdateWorkflow
ModelsExpand Collapse
Workflow object { id, metadata, spec, webhookUrl } Workflow represents a workflow configuration.
Workflow represents a workflow configuration.
metadata: optional object { createdAt, creator, description, 3 more } WorkflowMetadata contains workflow metadata.
WorkflowMetadata contains workflow metadata.
A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.
All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.
The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.
Examples
Example 1: Compute Timestamp from POSIX time().
Timestamp timestamp;
timestamp.set_seconds(time(NULL));
timestamp.set_nanos(0);
Example 2: Compute Timestamp from POSIX gettimeofday().
struct timeval tv;
gettimeofday(&tv, NULL);
Timestamp timestamp;
timestamp.set_seconds(tv.tv_sec);
timestamp.set_nanos(tv.tv_usec * 1000);
Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().
FILETIME ft;
GetSystemTimeAsFileTime(&ft);
UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
// A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
// is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
Timestamp timestamp;
timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
Example 4: Compute Timestamp from Java System.currentTimeMillis().
long millis = System.currentTimeMillis();
Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
.setNanos((int) ((millis % 1000) * 1000000)).build();
Example 5: Compute Timestamp from Java Instant.now().
Instant now = Instant.now();
Timestamp timestamp =
Timestamp.newBuilder().setSeconds(now.getEpochSecond())
.setNanos(now.getNano()).build();
Example 6: Compute Timestamp from current time in Python.
timestamp = Timestamp()
timestamp.GetCurrentTime()
JSON Mapping
In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).
For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.
In JavaScript, one can convert a Date object to this format using the
standard
toISOString()
method. In Python, a standard datetime.datetime object can be converted
to this format using
strftime with
the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use
the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.
A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.
All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.
The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.
Examples
Example 1: Compute Timestamp from POSIX time().
Timestamp timestamp;
timestamp.set_seconds(time(NULL));
timestamp.set_nanos(0);
Example 2: Compute Timestamp from POSIX gettimeofday().
struct timeval tv;
gettimeofday(&tv, NULL);
Timestamp timestamp;
timestamp.set_seconds(tv.tv_sec);
timestamp.set_nanos(tv.tv_usec * 1000);
Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().
FILETIME ft;
GetSystemTimeAsFileTime(&ft);
UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
// A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
// is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
Timestamp timestamp;
timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
Example 4: Compute Timestamp from Java System.currentTimeMillis().
long millis = System.currentTimeMillis();
Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
.setNanos((int) ((millis % 1000) * 1000000)).build();
Example 5: Compute Timestamp from Java Instant.now().
Instant now = Instant.now();
Timestamp timestamp =
Timestamp.newBuilder().setSeconds(now.getEpochSecond())
.setNanos(now.getNano()).build();
Example 6: Compute Timestamp from current time in Python.
timestamp = Timestamp()
timestamp.GetCurrentTime()
JSON Mapping
In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).
For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.
In JavaScript, one can convert a Date object to this format using the
standard
toISOString()
method. In Python, a standard datetime.datetime object can be converted
to this format using
strftime with
the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use
the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.
spec: optional object { action, report, triggers }
WorkflowAction defines the actions to be executed in a workflow.
WorkflowAction defines the actions to be executed in a workflow.
limits: object { maxParallel, maxTotal, perExecution } Limits defines execution limits for workflow actions.
Concurrent actions limit cannot exceed total actions limit:
this.max_parallel <= this.max_total
Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:
this.max_parallel <= this.max_totalAutomation must have between 1 and 50 steps:
size(this) >= 1 && size(this) <= 50
Automation must have between 1 and 50 steps:
size(this) >= 1 && size(this) <= 50agent: optional object { prompt } WorkflowAgentStep represents an agent step that executes with a prompt.
WorkflowAgentStep represents an agent step that executes with a prompt.
WorkflowAction defines the actions to be executed in a workflow.
WorkflowAction defines the actions to be executed in a workflow.
limits: object { maxParallel, maxTotal, perExecution } Limits defines execution limits for workflow actions.
Concurrent actions limit cannot exceed total actions limit:
this.max_parallel <= this.max_total
Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:
this.max_parallel <= this.max_totalAutomation must have between 1 and 50 steps:
size(this) >= 1 && size(this) <= 50
Automation must have between 1 and 50 steps:
size(this) >= 1 && size(this) <= 50agent: optional object { prompt } WorkflowAgentStep represents an agent step that executes with a prompt.
WorkflowAgentStep represents an agent step that executes with a prompt.
WorkflowTriggerContext defines the context in which a workflow should run.
Context determines where and how the workflow executes:
- Projects: Execute in specific project environments
- Repositories: Execute in environments created from repository URLs
- Agent: Execute in agent-managed environments with custom prompts
- FromTrigger: Use context derived from the trigger event (PR-specific)
Context Usage by Trigger Type:
- Manual: Can use any context type
- Time: Typically uses Projects or Repositories context
- PullRequest: Can use any context, FromTrigger uses PR repository context
WorkflowTriggerContext defines the context in which a workflow should run.
Context determines where and how the workflow executes:
- Projects: Execute in specific project environments
- Repositories: Execute in environments created from repository URLs
- Agent: Execute in agent-managed environments with custom prompts
- FromTrigger: Use context derived from the trigger event (PR-specific)
Context Usage by Trigger Type:
- Manual: Can use any context type
- Time: Typically uses Projects or Repositories context
- PullRequest: Can use any context, FromTrigger uses PR repository context
agent: optional object { prompt } Execute workflow in agent-managed environments.
Agent receives the specified prompt and manages execution context.
Execute workflow in agent-managed environments. Agent receives the specified prompt and manages execution context.
Use context derived from the trigger event. Currently only supported for PullRequest triggers - uses PR repository context.
projects: optional object { projectIds } Execute workflow in specific project environments.
Creates environments for each specified project.
Execute workflow in specific project environments. Creates environments for each specified project.
repositories: optional object { environmentClassId, repoSelector, repositoryUrls } Execute workflow in environments created from repository URLs.
Supports both explicit repository URLs and search patterns.
Execute workflow in environments created from repository URLs. Supports both explicit repository URLs and search patterns.
repoSelector: optional object { repoSearchString, scmHost } RepositorySelector defines how to select repositories for workflow execution.
Combines a search string with an SCM host to identify repositories.
RepositorySelector defines how to select repositories for workflow execution. Combines a search string with an SCM host to identify repositories.
Search string to match repositories using SCM-specific search patterns. For GitHub: supports GitHub search syntax (e.g., “org:gitpod-io language:go”, “user:octocat stars:>100”) For GitLab: supports GitLab search syntax See SCM provider documentation for supported search patterns.
Manual trigger - executed when StartWorkflow RPC is called. No additional configuration needed.
pullRequest: optional object { events, integrationId, webhookId } Pull request trigger - executed when specified PR events occur.
Only triggers for PRs in repositories matching the trigger context.
Pull request trigger - executed when specified PR events occur. Only triggers for PRs in repositories matching the trigger context.
events: optional array of "PULL_REQUEST_EVENT_UNSPECIFIED" or "PULL_REQUEST_EVENT_OPENED" or "PULL_REQUEST_EVENT_UPDATED" or 4 more
WorkflowAction object { limits, steps } WorkflowAction defines the actions to be executed in a workflow.
WorkflowAction defines the actions to be executed in a workflow.
limits: object { maxParallel, maxTotal, perExecution } Limits defines execution limits for workflow actions.
Concurrent actions limit cannot exceed total actions limit:
this.max_parallel <= this.max_total
Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:
this.max_parallel <= this.max_totalAutomation must have between 1 and 50 steps:
size(this) >= 1 && size(this) <= 50
Automation must have between 1 and 50 steps:
size(this) >= 1 && size(this) <= 50agent: optional object { prompt } WorkflowAgentStep represents an agent step that executes with a prompt.
WorkflowAgentStep represents an agent step that executes with a prompt.
WorkflowExecution object { id, metadata, spec, status } WorkflowExecution represents a workflow execution instance.
WorkflowExecution represents a workflow execution instance.
metadata: optional object { creator, executor, finishedAt, 2 more } WorkflowExecutionMetadata contains workflow execution metadata.
WorkflowExecutionMetadata contains workflow execution metadata.
A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.
All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.
The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.
Examples
Example 1: Compute Timestamp from POSIX time().
Timestamp timestamp;
timestamp.set_seconds(time(NULL));
timestamp.set_nanos(0);
Example 2: Compute Timestamp from POSIX gettimeofday().
struct timeval tv;
gettimeofday(&tv, NULL);
Timestamp timestamp;
timestamp.set_seconds(tv.tv_sec);
timestamp.set_nanos(tv.tv_usec * 1000);
Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().
FILETIME ft;
GetSystemTimeAsFileTime(&ft);
UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
// A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
// is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
Timestamp timestamp;
timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
Example 4: Compute Timestamp from Java System.currentTimeMillis().
long millis = System.currentTimeMillis();
Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
.setNanos((int) ((millis % 1000) * 1000000)).build();
Example 5: Compute Timestamp from Java Instant.now().
Instant now = Instant.now();
Timestamp timestamp =
Timestamp.newBuilder().setSeconds(now.getEpochSecond())
.setNanos(now.getNano()).build();
Example 6: Compute Timestamp from current time in Python.
timestamp = Timestamp()
timestamp.GetCurrentTime()
JSON Mapping
In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).
For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.
In JavaScript, one can convert a Date object to this format using the
standard
toISOString()
method. In Python, a standard datetime.datetime object can be converted
to this format using
strftime with
the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use
the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.
A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.
All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.
The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.
Examples
Example 1: Compute Timestamp from POSIX time().
Timestamp timestamp;
timestamp.set_seconds(time(NULL));
timestamp.set_nanos(0);
Example 2: Compute Timestamp from POSIX gettimeofday().
struct timeval tv;
gettimeofday(&tv, NULL);
Timestamp timestamp;
timestamp.set_seconds(tv.tv_sec);
timestamp.set_nanos(tv.tv_usec * 1000);
Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().
FILETIME ft;
GetSystemTimeAsFileTime(&ft);
UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
// A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
// is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
Timestamp timestamp;
timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
Example 4: Compute Timestamp from Java System.currentTimeMillis().
long millis = System.currentTimeMillis();
Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
.setNanos((int) ((millis % 1000) * 1000000)).build();
Example 5: Compute Timestamp from Java Instant.now().
Instant now = Instant.now();
Timestamp timestamp =
Timestamp.newBuilder().setSeconds(now.getEpochSecond())
.setNanos(now.getNano()).build();
Example 6: Compute Timestamp from current time in Python.
timestamp = Timestamp()
timestamp.GetCurrentTime()
JSON Mapping
In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).
For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.
In JavaScript, one can convert a Date object to this format using the
standard
toISOString()
method. In Python, a standard datetime.datetime object can be converted
to this format using
strftime with
the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use
the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.
spec: optional object { action, report, trigger } WorkflowExecutionSpec contains the specification used for this execution.
WorkflowExecutionSpec contains the specification used for this execution.
WorkflowAction defines the actions to be executed in a workflow.
WorkflowAction defines the actions to be executed in a workflow.
limits: object { maxParallel, maxTotal, perExecution } Limits defines execution limits for workflow actions.
Concurrent actions limit cannot exceed total actions limit:
this.max_parallel <= this.max_total
Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:
this.max_parallel <= this.max_totalAutomation must have between 1 and 50 steps:
size(this) >= 1 && size(this) <= 50
Automation must have between 1 and 50 steps:
size(this) >= 1 && size(this) <= 50agent: optional object { prompt } WorkflowAgentStep represents an agent step that executes with a prompt.
WorkflowAgentStep represents an agent step that executes with a prompt.
WorkflowAction defines the actions to be executed in a workflow.
WorkflowAction defines the actions to be executed in a workflow.
limits: object { maxParallel, maxTotal, perExecution } Limits defines execution limits for workflow actions.
Concurrent actions limit cannot exceed total actions limit:
this.max_parallel <= this.max_total
Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:
this.max_parallel <= this.max_totalAutomation must have between 1 and 50 steps:
size(this) >= 1 && size(this) <= 50
Automation must have between 1 and 50 steps:
size(this) >= 1 && size(this) <= 50agent: optional object { prompt } WorkflowAgentStep represents an agent step that executes with a prompt.
WorkflowAgentStep represents an agent step that executes with a prompt.
trigger: optional object { context, manual, pullRequest, time } WorkflowExecutionTrigger represents a workflow execution trigger instance.
WorkflowExecutionTrigger represents a workflow execution trigger instance.
Context from the workflow trigger - copied at execution time for immutability.
This allows the reconciler to create actions without fetching the workflow definition.
Context from the workflow trigger - copied at execution time for immutability. This allows the reconciler to create actions without fetching the workflow definition.
agent: optional object { prompt } Execute workflow in agent-managed environments.
Agent receives the specified prompt and manages execution context.
Execute workflow in agent-managed environments. Agent receives the specified prompt and manages execution context.
Use context derived from the trigger event. Currently only supported for PullRequest triggers - uses PR repository context.
projects: optional object { projectIds } Execute workflow in specific project environments.
Creates environments for each specified project.
Execute workflow in specific project environments. Creates environments for each specified project.
repositories: optional object { environmentClassId, repoSelector, repositoryUrls } Execute workflow in environments created from repository URLs.
Supports both explicit repository URLs and search patterns.
Execute workflow in environments created from repository URLs. Supports both explicit repository URLs and search patterns.
repoSelector: optional object { repoSearchString, scmHost } RepositorySelector defines how to select repositories for workflow execution.
Combines a search string with an SCM host to identify repositories.
RepositorySelector defines how to select repositories for workflow execution. Combines a search string with an SCM host to identify repositories.
Search string to match repositories using SCM-specific search patterns. For GitHub: supports GitHub search syntax (e.g., “org:gitpod-io language:go”, “user:octocat stars:>100”) For GitLab: supports GitLab search syntax See SCM provider documentation for supported search patterns.
pullRequest: optional object { id, author, draft, 6 more } PullRequest represents pull request metadata from source control systems.
This message is used across workflow triggers, executions, and agent contexts
to maintain consistent PR information throughout the system.
PullRequest represents pull request metadata from source control systems. This message is used across workflow triggers, executions, and agent contexts to maintain consistent PR information throughout the system.
Pull request URL (e.g., “https://github.com/owner/repo/pull/123”)
time: optional object { triggeredAt } Time trigger - just the timestamp when it was triggered
Time trigger - just the timestamp when it was triggered
A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.
All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.
The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.
Examples
Example 1: Compute Timestamp from POSIX time().
Timestamp timestamp;
timestamp.set_seconds(time(NULL));
timestamp.set_nanos(0);
Example 2: Compute Timestamp from POSIX gettimeofday().
struct timeval tv;
gettimeofday(&tv, NULL);
Timestamp timestamp;
timestamp.set_seconds(tv.tv_sec);
timestamp.set_nanos(tv.tv_usec * 1000);
Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().
FILETIME ft;
GetSystemTimeAsFileTime(&ft);
UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
// A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
// is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
Timestamp timestamp;
timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
Example 4: Compute Timestamp from Java System.currentTimeMillis().
long millis = System.currentTimeMillis();
Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
.setNanos((int) ((millis % 1000) * 1000000)).build();
Example 5: Compute Timestamp from Java Instant.now().
Instant now = Instant.now();
Timestamp timestamp =
Timestamp.newBuilder().setSeconds(now.getEpochSecond())
.setNanos(now.getNano()).build();
Example 6: Compute Timestamp from current time in Python.
timestamp = Timestamp()
timestamp.GetCurrentTime()
JSON Mapping
In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).
For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.
In JavaScript, one can convert a Date object to this format using the
standard
toISOString()
method. In Python, a standard datetime.datetime object can be converted
to this format using
strftime with
the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use
the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.
status: optional object { doneActionCount, failedActionCount, failures, 5 more } WorkflowExecutionStatus contains the current status of a workflow execution.
WorkflowExecutionStatus contains the current status of a workflow execution.
failures: optional array of object { code, message, meta, 2 more } Structured failures that caused the workflow execution to fail.
Provides detailed error codes, messages, and retry information.
Structured failures that caused the workflow execution to fail. Provides detailed error codes, messages, and retry information.
code: optional "WORKFLOW_ERROR_CODE_UNSPECIFIED" or "WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR" or "WORKFLOW_ERROR_CODE_AGENT_ERROR"Error code identifying the type of error.
Error code identifying the type of error.
Additional metadata about the error. Common keys include:
- environment_id: ID of the environment
- task_id: ID of the task
- service_id: ID of the service
- workflow_id: ID of the workflow
- workflow_execution_id: ID of the workflow execution
phase: optional "WORKFLOW_EXECUTION_PHASE_UNSPECIFIED" or "WORKFLOW_EXECUTION_PHASE_PENDING" or "WORKFLOW_EXECUTION_PHASE_RUNNING" or 5 more
warnings: optional array of object { code, message, meta, 2 more } Structured warnings about the workflow execution.
Provides detailed warning codes and messages.
Structured warnings about the workflow execution. Provides detailed warning codes and messages.
code: optional "WORKFLOW_ERROR_CODE_UNSPECIFIED" or "WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR" or "WORKFLOW_ERROR_CODE_AGENT_ERROR"Error code identifying the type of error.
Error code identifying the type of error.
Additional metadata about the error. Common keys include:
- environment_id: ID of the environment
- task_id: ID of the task
- service_id: ID of the service
- workflow_id: ID of the workflow
- workflow_execution_id: ID of the workflow execution
WorkflowExecutionAction object { id, metadata, spec, status } WorkflowExecutionAction represents a workflow execution action instance.
WorkflowExecutionAction represents a workflow execution action instance.
metadata: optional object { actionName, finishedAt, startedAt, 2 more } WorkflowExecutionActionMetadata contains workflow execution action metadata.
WorkflowExecutionActionMetadata contains workflow execution action metadata.
Human-readable name for this action based on its context. Examples: “gitpod-io/gitpod-next” for repository context, “My Project” for project context. Will be empty string for actions created before this field was added.
A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.
All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.
The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.
Examples
Example 1: Compute Timestamp from POSIX time().
Timestamp timestamp;
timestamp.set_seconds(time(NULL));
timestamp.set_nanos(0);
Example 2: Compute Timestamp from POSIX gettimeofday().
struct timeval tv;
gettimeofday(&tv, NULL);
Timestamp timestamp;
timestamp.set_seconds(tv.tv_sec);
timestamp.set_nanos(tv.tv_usec * 1000);
Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().
FILETIME ft;
GetSystemTimeAsFileTime(&ft);
UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
// A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
// is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
Timestamp timestamp;
timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
Example 4: Compute Timestamp from Java System.currentTimeMillis().
long millis = System.currentTimeMillis();
Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
.setNanos((int) ((millis % 1000) * 1000000)).build();
Example 5: Compute Timestamp from Java Instant.now().
Instant now = Instant.now();
Timestamp timestamp =
Timestamp.newBuilder().setSeconds(now.getEpochSecond())
.setNanos(now.getNano()).build();
Example 6: Compute Timestamp from current time in Python.
timestamp = Timestamp()
timestamp.GetCurrentTime()
JSON Mapping
In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).
For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.
In JavaScript, one can convert a Date object to this format using the
standard
toISOString()
method. In Python, a standard datetime.datetime object can be converted
to this format using
strftime with
the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use
the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.
A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.
All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.
The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.
Examples
Example 1: Compute Timestamp from POSIX time().
Timestamp timestamp;
timestamp.set_seconds(time(NULL));
timestamp.set_nanos(0);
Example 2: Compute Timestamp from POSIX gettimeofday().
struct timeval tv;
gettimeofday(&tv, NULL);
Timestamp timestamp;
timestamp.set_seconds(tv.tv_sec);
timestamp.set_nanos(tv.tv_usec * 1000);
Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().
FILETIME ft;
GetSystemTimeAsFileTime(&ft);
UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
// A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
// is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
Timestamp timestamp;
timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
Example 4: Compute Timestamp from Java System.currentTimeMillis().
long millis = System.currentTimeMillis();
Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
.setNanos((int) ((millis % 1000) * 1000000)).build();
Example 5: Compute Timestamp from Java Instant.now().
Instant now = Instant.now();
Timestamp timestamp =
Timestamp.newBuilder().setSeconds(now.getEpochSecond())
.setNanos(now.getNano()).build();
Example 6: Compute Timestamp from current time in Python.
timestamp = Timestamp()
timestamp.GetCurrentTime()
JSON Mapping
In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).
For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.
In JavaScript, one can convert a Date object to this format using the
standard
toISOString()
method. In Python, a standard datetime.datetime object can be converted
to this format using
strftime with
the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use
the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.
spec: optional object { context, limits } WorkflowExecutionActionSpec contains the specification for this execution action.
WorkflowExecutionActionSpec contains the specification for this execution action.
Context for the execution action - specifies where and how the action executes.
This is resolved from the workflow trigger context and contains the specific
project, repository, or agent context for this execution instance.
Context for the execution action - specifies where and how the action executes. This is resolved from the workflow trigger context and contains the specific project, repository, or agent context for this execution instance.
pullRequest: optional object { id, author, draft, 6 more } Pull request context - optional metadata about the PR being worked on
This is populated when the agent execution is triggered by a PR workflow
or when explicitly provided through the browser extension
Pull request context - optional metadata about the PR being worked on This is populated when the agent execution is triggered by a PR workflow or when explicitly provided through the browser extension
Pull request URL (e.g., “https://github.com/owner/repo/pull/123”)
status: optional object { agentExecutionId, environmentId, failures, 3 more } WorkflowExecutionActionStatus contains the current status of a workflow execution action.
WorkflowExecutionActionStatus contains the current status of a workflow execution action.
failures: optional array of object { code, message, meta, 2 more } Structured failures that caused the workflow execution action to fail.
Provides detailed error codes, messages, and retry information.
Structured failures that caused the workflow execution action to fail. Provides detailed error codes, messages, and retry information.
code: optional "WORKFLOW_ERROR_CODE_UNSPECIFIED" or "WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR" or "WORKFLOW_ERROR_CODE_AGENT_ERROR"Error code identifying the type of error.
Error code identifying the type of error.
Additional metadata about the error. Common keys include:
- environment_id: ID of the environment
- task_id: ID of the task
- service_id: ID of the service
- workflow_id: ID of the workflow
- workflow_execution_id: ID of the workflow execution
phase: optional "WORKFLOW_EXECUTION_ACTION_PHASE_UNSPECIFIED" or "WORKFLOW_EXECUTION_ACTION_PHASE_PENDING" or "WORKFLOW_EXECUTION_ACTION_PHASE_RUNNING" or 5 moreWorkflowExecutionActionPhase defines the phases of workflow execution action.
WorkflowExecutionActionPhase defines the phases of workflow execution action.
stepStatuses: optional array of object { error, finishedAt, phase, 3 more } Step-level progress tracking
Step-level progress tracking
error: optional object { code, message, meta, 2 more } Structured error that caused the step to fail.
Provides detailed error code, message, and retry information.
Structured error that caused the step to fail. Provides detailed error code, message, and retry information.
code: optional "WORKFLOW_ERROR_CODE_UNSPECIFIED" or "WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR" or "WORKFLOW_ERROR_CODE_AGENT_ERROR"Error code identifying the type of error.
Error code identifying the type of error.
Additional metadata about the error. Common keys include:
- environment_id: ID of the environment
- task_id: ID of the task
- service_id: ID of the service
- workflow_id: ID of the workflow
- workflow_execution_id: ID of the workflow execution
A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.
All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.
The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.
Examples
Example 1: Compute Timestamp from POSIX time().
Timestamp timestamp;
timestamp.set_seconds(time(NULL));
timestamp.set_nanos(0);
Example 2: Compute Timestamp from POSIX gettimeofday().
struct timeval tv;
gettimeofday(&tv, NULL);
Timestamp timestamp;
timestamp.set_seconds(tv.tv_sec);
timestamp.set_nanos(tv.tv_usec * 1000);
Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().
FILETIME ft;
GetSystemTimeAsFileTime(&ft);
UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
// A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
// is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
Timestamp timestamp;
timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
Example 4: Compute Timestamp from Java System.currentTimeMillis().
long millis = System.currentTimeMillis();
Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
.setNanos((int) ((millis % 1000) * 1000000)).build();
Example 5: Compute Timestamp from Java Instant.now().
Instant now = Instant.now();
Timestamp timestamp =
Timestamp.newBuilder().setSeconds(now.getEpochSecond())
.setNanos(now.getNano()).build();
Example 6: Compute Timestamp from current time in Python.
timestamp = Timestamp()
timestamp.GetCurrentTime()
JSON Mapping
In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).
For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.
In JavaScript, one can convert a Date object to this format using the
standard
toISOString()
method. In Python, a standard datetime.datetime object can be converted
to this format using
strftime with
the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use
the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.
A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.
All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.
The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.
Examples
Example 1: Compute Timestamp from POSIX time().
Timestamp timestamp;
timestamp.set_seconds(time(NULL));
timestamp.set_nanos(0);
Example 2: Compute Timestamp from POSIX gettimeofday().
struct timeval tv;
gettimeofday(&tv, NULL);
Timestamp timestamp;
timestamp.set_seconds(tv.tv_sec);
timestamp.set_nanos(tv.tv_usec * 1000);
Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().
FILETIME ft;
GetSystemTimeAsFileTime(&ft);
UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
// A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
// is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
Timestamp timestamp;
timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
Example 4: Compute Timestamp from Java System.currentTimeMillis().
long millis = System.currentTimeMillis();
Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
.setNanos((int) ((millis % 1000) * 1000000)).build();
Example 5: Compute Timestamp from Java Instant.now().
Instant now = Instant.now();
Timestamp timestamp =
Timestamp.newBuilder().setSeconds(now.getEpochSecond())
.setNanos(now.getNano()).build();
Example 6: Compute Timestamp from current time in Python.
timestamp = Timestamp()
timestamp.GetCurrentTime()
JSON Mapping
In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).
For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.
In JavaScript, one can convert a Date object to this format using the
standard
toISOString()
method. In Python, a standard datetime.datetime object can be converted
to this format using
strftime with
the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use
the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.
The step definition captured at execution time for immutability.
This ensures the UI shows the correct step even if the workflow definition changes.
The step definition captured at execution time for immutability. This ensures the UI shows the correct step even if the workflow definition changes.
agent: optional object { prompt } WorkflowAgentStep represents an agent step that executes with a prompt.
WorkflowAgentStep represents an agent step that executes with a prompt.
warnings: optional array of object { code, message, meta, 2 more } Structured warnings about the workflow execution action.
Provides detailed warning codes and messages.
Structured warnings about the workflow execution action. Provides detailed warning codes and messages.
code: optional "WORKFLOW_ERROR_CODE_UNSPECIFIED" or "WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR" or "WORKFLOW_ERROR_CODE_AGENT_ERROR"Error code identifying the type of error.
Error code identifying the type of error.
Additional metadata about the error. Common keys include:
- environment_id: ID of the environment
- task_id: ID of the task
- service_id: ID of the service
- workflow_id: ID of the workflow
- workflow_execution_id: ID of the workflow execution
WorkflowStep object { agent, pullRequest, task } WorkflowStep defines a single step in a workflow action.
WorkflowStep defines a single step in a workflow action.
agent: optional object { prompt } WorkflowAgentStep represents an agent step that executes with a prompt.
WorkflowAgentStep represents an agent step that executes with a prompt.
WorkflowTrigger object { context, manual, pullRequest, time } WorkflowTrigger defines when a workflow should be executed.
Each trigger type defines a specific condition that will cause the workflow to execute:
- Manual: Triggered explicitly by user action via StartWorkflow RPC
- Time: Triggered automatically based on cron schedule
- PullRequest: Triggered automatically when specified PR events occur
Trigger Semantics:
- Each trigger instance can create multiple workflow executions
- Multiple triggers of the same workflow can fire simultaneously
- Each trigger execution is independent and tracked separately
- Triggers are evaluated in the context specified by WorkflowTriggerContext
WorkflowTrigger defines when a workflow should be executed.
Each trigger type defines a specific condition that will cause the workflow to execute:
- Manual: Triggered explicitly by user action via StartWorkflow RPC
- Time: Triggered automatically based on cron schedule
- PullRequest: Triggered automatically when specified PR events occur
Trigger Semantics:
- Each trigger instance can create multiple workflow executions
- Multiple triggers of the same workflow can fire simultaneously
- Each trigger execution is independent and tracked separately
- Triggers are evaluated in the context specified by WorkflowTriggerContext
WorkflowTriggerContext defines the context in which a workflow should run.
Context determines where and how the workflow executes:
- Projects: Execute in specific project environments
- Repositories: Execute in environments created from repository URLs
- Agent: Execute in agent-managed environments with custom prompts
- FromTrigger: Use context derived from the trigger event (PR-specific)
Context Usage by Trigger Type:
- Manual: Can use any context type
- Time: Typically uses Projects or Repositories context
- PullRequest: Can use any context, FromTrigger uses PR repository context
WorkflowTriggerContext defines the context in which a workflow should run.
Context determines where and how the workflow executes:
- Projects: Execute in specific project environments
- Repositories: Execute in environments created from repository URLs
- Agent: Execute in agent-managed environments with custom prompts
- FromTrigger: Use context derived from the trigger event (PR-specific)
Context Usage by Trigger Type:
- Manual: Can use any context type
- Time: Typically uses Projects or Repositories context
- PullRequest: Can use any context, FromTrigger uses PR repository context
agent: optional object { prompt } Execute workflow in agent-managed environments.
Agent receives the specified prompt and manages execution context.
Execute workflow in agent-managed environments. Agent receives the specified prompt and manages execution context.
Use context derived from the trigger event. Currently only supported for PullRequest triggers - uses PR repository context.
projects: optional object { projectIds } Execute workflow in specific project environments.
Creates environments for each specified project.
Execute workflow in specific project environments. Creates environments for each specified project.
repositories: optional object { environmentClassId, repoSelector, repositoryUrls } Execute workflow in environments created from repository URLs.
Supports both explicit repository URLs and search patterns.
Execute workflow in environments created from repository URLs. Supports both explicit repository URLs and search patterns.
repoSelector: optional object { repoSearchString, scmHost } RepositorySelector defines how to select repositories for workflow execution.
Combines a search string with an SCM host to identify repositories.
RepositorySelector defines how to select repositories for workflow execution. Combines a search string with an SCM host to identify repositories.
Search string to match repositories using SCM-specific search patterns. For GitHub: supports GitHub search syntax (e.g., “org:gitpod-io language:go”, “user:octocat stars:>100”) For GitLab: supports GitLab search syntax See SCM provider documentation for supported search patterns.
Manual trigger - executed when StartWorkflow RPC is called. No additional configuration needed.
pullRequest: optional object { events, integrationId, webhookId } Pull request trigger - executed when specified PR events occur.
Only triggers for PRs in repositories matching the trigger context.
Pull request trigger - executed when specified PR events occur. Only triggers for PRs in repositories matching the trigger context.
events: optional array of "PULL_REQUEST_EVENT_UNSPECIFIED" or "PULL_REQUEST_EVENT_OPENED" or "PULL_REQUEST_EVENT_UPDATED" or 4 more
WorkflowTriggerContext object { agent, fromTrigger, projects, repositories } WorkflowTriggerContext defines the context in which a workflow should run.
Context determines where and how the workflow executes:
- Projects: Execute in specific project environments
- Repositories: Execute in environments created from repository URLs
- Agent: Execute in agent-managed environments with custom prompts
- FromTrigger: Use context derived from the trigger event (PR-specific)
Context Usage by Trigger Type:
- Manual: Can use any context type
- Time: Typically uses Projects or Repositories context
- PullRequest: Can use any context, FromTrigger uses PR repository context
WorkflowTriggerContext defines the context in which a workflow should run.
Context determines where and how the workflow executes:
- Projects: Execute in specific project environments
- Repositories: Execute in environments created from repository URLs
- Agent: Execute in agent-managed environments with custom prompts
- FromTrigger: Use context derived from the trigger event (PR-specific)
Context Usage by Trigger Type:
- Manual: Can use any context type
- Time: Typically uses Projects or Repositories context
- PullRequest: Can use any context, FromTrigger uses PR repository context
agent: optional object { prompt } Execute workflow in agent-managed environments.
Agent receives the specified prompt and manages execution context.
Execute workflow in agent-managed environments. Agent receives the specified prompt and manages execution context.
Use context derived from the trigger event. Currently only supported for PullRequest triggers - uses PR repository context.
projects: optional object { projectIds } Execute workflow in specific project environments.
Creates environments for each specified project.
Execute workflow in specific project environments. Creates environments for each specified project.
repositories: optional object { environmentClassId, repoSelector, repositoryUrls } Execute workflow in environments created from repository URLs.
Supports both explicit repository URLs and search patterns.
Execute workflow in environments created from repository URLs. Supports both explicit repository URLs and search patterns.
repoSelector: optional object { repoSearchString, scmHost } RepositorySelector defines how to select repositories for workflow execution.
Combines a search string with an SCM host to identify repositories.
RepositorySelector defines how to select repositories for workflow execution. Combines a search string with an SCM host to identify repositories.
Search string to match repositories using SCM-specific search patterns. For GitHub: supports GitHub search syntax (e.g., “org:gitpod-io language:go”, “user:octocat stars:>100”) For GitLab: supports GitLab search syntax See SCM provider documentation for supported search patterns.
AutomationCreateResponse object { workflow }
Workflow represents a workflow configuration.
Workflow represents a workflow configuration.
metadata: optional object { createdAt, creator, description, 3 more } WorkflowMetadata contains workflow metadata.
WorkflowMetadata contains workflow metadata.
A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.
All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.
The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.
Examples
Example 1: Compute Timestamp from POSIX time().
Timestamp timestamp;
timestamp.set_seconds(time(NULL));
timestamp.set_nanos(0);
Example 2: Compute Timestamp from POSIX gettimeofday().
struct timeval tv;
gettimeofday(&tv, NULL);
Timestamp timestamp;
timestamp.set_seconds(tv.tv_sec);
timestamp.set_nanos(tv.tv_usec * 1000);
Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().
FILETIME ft;
GetSystemTimeAsFileTime(&ft);
UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
// A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
// is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
Timestamp timestamp;
timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
Example 4: Compute Timestamp from Java System.currentTimeMillis().
long millis = System.currentTimeMillis();
Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
.setNanos((int) ((millis % 1000) * 1000000)).build();
Example 5: Compute Timestamp from Java Instant.now().
Instant now = Instant.now();
Timestamp timestamp =
Timestamp.newBuilder().setSeconds(now.getEpochSecond())
.setNanos(now.getNano()).build();
Example 6: Compute Timestamp from current time in Python.
timestamp = Timestamp()
timestamp.GetCurrentTime()
JSON Mapping
In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).
For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.
In JavaScript, one can convert a Date object to this format using the
standard
toISOString()
method. In Python, a standard datetime.datetime object can be converted
to this format using
strftime with
the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use
the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.
A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.
All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.
The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.
Examples
Example 1: Compute Timestamp from POSIX time().
Timestamp timestamp;
timestamp.set_seconds(time(NULL));
timestamp.set_nanos(0);
Example 2: Compute Timestamp from POSIX gettimeofday().
struct timeval tv;
gettimeofday(&tv, NULL);
Timestamp timestamp;
timestamp.set_seconds(tv.tv_sec);
timestamp.set_nanos(tv.tv_usec * 1000);
Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().
FILETIME ft;
GetSystemTimeAsFileTime(&ft);
UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
// A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
// is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
Timestamp timestamp;
timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
Example 4: Compute Timestamp from Java System.currentTimeMillis().
long millis = System.currentTimeMillis();
Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
.setNanos((int) ((millis % 1000) * 1000000)).build();
Example 5: Compute Timestamp from Java Instant.now().
Instant now = Instant.now();
Timestamp timestamp =
Timestamp.newBuilder().setSeconds(now.getEpochSecond())
.setNanos(now.getNano()).build();
Example 6: Compute Timestamp from current time in Python.
timestamp = Timestamp()
timestamp.GetCurrentTime()
JSON Mapping
In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).
For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.
In JavaScript, one can convert a Date object to this format using the
standard
toISOString()
method. In Python, a standard datetime.datetime object can be converted
to this format using
strftime with
the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use
the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.
spec: optional object { action, report, triggers }
WorkflowAction defines the actions to be executed in a workflow.
WorkflowAction defines the actions to be executed in a workflow.
limits: object { maxParallel, maxTotal, perExecution } Limits defines execution limits for workflow actions.
Concurrent actions limit cannot exceed total actions limit:
this.max_parallel <= this.max_total
Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:
this.max_parallel <= this.max_totalAutomation must have between 1 and 50 steps:
size(this) >= 1 && size(this) <= 50
Automation must have between 1 and 50 steps:
size(this) >= 1 && size(this) <= 50agent: optional object { prompt } WorkflowAgentStep represents an agent step that executes with a prompt.
WorkflowAgentStep represents an agent step that executes with a prompt.
WorkflowAction defines the actions to be executed in a workflow.
WorkflowAction defines the actions to be executed in a workflow.
limits: object { maxParallel, maxTotal, perExecution } Limits defines execution limits for workflow actions.
Concurrent actions limit cannot exceed total actions limit:
this.max_parallel <= this.max_total
Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:
this.max_parallel <= this.max_totalAutomation must have between 1 and 50 steps:
size(this) >= 1 && size(this) <= 50
Automation must have between 1 and 50 steps:
size(this) >= 1 && size(this) <= 50agent: optional object { prompt } WorkflowAgentStep represents an agent step that executes with a prompt.
WorkflowAgentStep represents an agent step that executes with a prompt.
WorkflowTriggerContext defines the context in which a workflow should run.
Context determines where and how the workflow executes:
- Projects: Execute in specific project environments
- Repositories: Execute in environments created from repository URLs
- Agent: Execute in agent-managed environments with custom prompts
- FromTrigger: Use context derived from the trigger event (PR-specific)
Context Usage by Trigger Type:
- Manual: Can use any context type
- Time: Typically uses Projects or Repositories context
- PullRequest: Can use any context, FromTrigger uses PR repository context
WorkflowTriggerContext defines the context in which a workflow should run.
Context determines where and how the workflow executes:
- Projects: Execute in specific project environments
- Repositories: Execute in environments created from repository URLs
- Agent: Execute in agent-managed environments with custom prompts
- FromTrigger: Use context derived from the trigger event (PR-specific)
Context Usage by Trigger Type:
- Manual: Can use any context type
- Time: Typically uses Projects or Repositories context
- PullRequest: Can use any context, FromTrigger uses PR repository context
agent: optional object { prompt } Execute workflow in agent-managed environments.
Agent receives the specified prompt and manages execution context.
Execute workflow in agent-managed environments. Agent receives the specified prompt and manages execution context.
Use context derived from the trigger event. Currently only supported for PullRequest triggers - uses PR repository context.
projects: optional object { projectIds } Execute workflow in specific project environments.
Creates environments for each specified project.
Execute workflow in specific project environments. Creates environments for each specified project.
repositories: optional object { environmentClassId, repoSelector, repositoryUrls } Execute workflow in environments created from repository URLs.
Supports both explicit repository URLs and search patterns.
Execute workflow in environments created from repository URLs. Supports both explicit repository URLs and search patterns.
repoSelector: optional object { repoSearchString, scmHost } RepositorySelector defines how to select repositories for workflow execution.
Combines a search string with an SCM host to identify repositories.
RepositorySelector defines how to select repositories for workflow execution. Combines a search string with an SCM host to identify repositories.
Search string to match repositories using SCM-specific search patterns. For GitHub: supports GitHub search syntax (e.g., “org:gitpod-io language:go”, “user:octocat stars:>100”) For GitLab: supports GitLab search syntax See SCM provider documentation for supported search patterns.
Manual trigger - executed when StartWorkflow RPC is called. No additional configuration needed.
pullRequest: optional object { events, integrationId, webhookId } Pull request trigger - executed when specified PR events occur.
Only triggers for PRs in repositories matching the trigger context.
Pull request trigger - executed when specified PR events occur. Only triggers for PRs in repositories matching the trigger context.
events: optional array of "PULL_REQUEST_EVENT_UNSPECIFIED" or "PULL_REQUEST_EVENT_OPENED" or "PULL_REQUEST_EVENT_UPDATED" or 4 more
AutomationRetrieveResponse object { workflow }
Workflow represents a workflow configuration.
Workflow represents a workflow configuration.
metadata: optional object { createdAt, creator, description, 3 more } WorkflowMetadata contains workflow metadata.
WorkflowMetadata contains workflow metadata.
A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.
All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.
The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.
Examples
Example 1: Compute Timestamp from POSIX time().
Timestamp timestamp;
timestamp.set_seconds(time(NULL));
timestamp.set_nanos(0);
Example 2: Compute Timestamp from POSIX gettimeofday().
struct timeval tv;
gettimeofday(&tv, NULL);
Timestamp timestamp;
timestamp.set_seconds(tv.tv_sec);
timestamp.set_nanos(tv.tv_usec * 1000);
Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().
FILETIME ft;
GetSystemTimeAsFileTime(&ft);
UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
// A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
// is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
Timestamp timestamp;
timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
Example 4: Compute Timestamp from Java System.currentTimeMillis().
long millis = System.currentTimeMillis();
Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
.setNanos((int) ((millis % 1000) * 1000000)).build();
Example 5: Compute Timestamp from Java Instant.now().
Instant now = Instant.now();
Timestamp timestamp =
Timestamp.newBuilder().setSeconds(now.getEpochSecond())
.setNanos(now.getNano()).build();
Example 6: Compute Timestamp from current time in Python.
timestamp = Timestamp()
timestamp.GetCurrentTime()
JSON Mapping
In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).
For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.
In JavaScript, one can convert a Date object to this format using the
standard
toISOString()
method. In Python, a standard datetime.datetime object can be converted
to this format using
strftime with
the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use
the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.
A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.
All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.
The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.
Examples
Example 1: Compute Timestamp from POSIX time().
Timestamp timestamp;
timestamp.set_seconds(time(NULL));
timestamp.set_nanos(0);
Example 2: Compute Timestamp from POSIX gettimeofday().
struct timeval tv;
gettimeofday(&tv, NULL);
Timestamp timestamp;
timestamp.set_seconds(tv.tv_sec);
timestamp.set_nanos(tv.tv_usec * 1000);
Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().
FILETIME ft;
GetSystemTimeAsFileTime(&ft);
UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
// A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
// is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
Timestamp timestamp;
timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
Example 4: Compute Timestamp from Java System.currentTimeMillis().
long millis = System.currentTimeMillis();
Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
.setNanos((int) ((millis % 1000) * 1000000)).build();
Example 5: Compute Timestamp from Java Instant.now().
Instant now = Instant.now();
Timestamp timestamp =
Timestamp.newBuilder().setSeconds(now.getEpochSecond())
.setNanos(now.getNano()).build();
Example 6: Compute Timestamp from current time in Python.
timestamp = Timestamp()
timestamp.GetCurrentTime()
JSON Mapping
In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).
For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.
In JavaScript, one can convert a Date object to this format using the
standard
toISOString()
method. In Python, a standard datetime.datetime object can be converted
to this format using
strftime with
the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use
the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.
spec: optional object { action, report, triggers }
WorkflowAction defines the actions to be executed in a workflow.
WorkflowAction defines the actions to be executed in a workflow.
limits: object { maxParallel, maxTotal, perExecution } Limits defines execution limits for workflow actions.
Concurrent actions limit cannot exceed total actions limit:
this.max_parallel <= this.max_total
Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:
this.max_parallel <= this.max_totalAutomation must have between 1 and 50 steps:
size(this) >= 1 && size(this) <= 50
Automation must have between 1 and 50 steps:
size(this) >= 1 && size(this) <= 50agent: optional object { prompt } WorkflowAgentStep represents an agent step that executes with a prompt.
WorkflowAgentStep represents an agent step that executes with a prompt.
WorkflowAction defines the actions to be executed in a workflow.
WorkflowAction defines the actions to be executed in a workflow.
limits: object { maxParallel, maxTotal, perExecution } Limits defines execution limits for workflow actions.
Concurrent actions limit cannot exceed total actions limit:
this.max_parallel <= this.max_total
Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:
this.max_parallel <= this.max_totalAutomation must have between 1 and 50 steps:
size(this) >= 1 && size(this) <= 50
Automation must have between 1 and 50 steps:
size(this) >= 1 && size(this) <= 50agent: optional object { prompt } WorkflowAgentStep represents an agent step that executes with a prompt.
WorkflowAgentStep represents an agent step that executes with a prompt.
WorkflowTriggerContext defines the context in which a workflow should run.
Context determines where and how the workflow executes:
- Projects: Execute in specific project environments
- Repositories: Execute in environments created from repository URLs
- Agent: Execute in agent-managed environments with custom prompts
- FromTrigger: Use context derived from the trigger event (PR-specific)
Context Usage by Trigger Type:
- Manual: Can use any context type
- Time: Typically uses Projects or Repositories context
- PullRequest: Can use any context, FromTrigger uses PR repository context
WorkflowTriggerContext defines the context in which a workflow should run.
Context determines where and how the workflow executes:
- Projects: Execute in specific project environments
- Repositories: Execute in environments created from repository URLs
- Agent: Execute in agent-managed environments with custom prompts
- FromTrigger: Use context derived from the trigger event (PR-specific)
Context Usage by Trigger Type:
- Manual: Can use any context type
- Time: Typically uses Projects or Repositories context
- PullRequest: Can use any context, FromTrigger uses PR repository context
agent: optional object { prompt } Execute workflow in agent-managed environments.
Agent receives the specified prompt and manages execution context.
Execute workflow in agent-managed environments. Agent receives the specified prompt and manages execution context.
Use context derived from the trigger event. Currently only supported for PullRequest triggers - uses PR repository context.
projects: optional object { projectIds } Execute workflow in specific project environments.
Creates environments for each specified project.
Execute workflow in specific project environments. Creates environments for each specified project.
repositories: optional object { environmentClassId, repoSelector, repositoryUrls } Execute workflow in environments created from repository URLs.
Supports both explicit repository URLs and search patterns.
Execute workflow in environments created from repository URLs. Supports both explicit repository URLs and search patterns.
repoSelector: optional object { repoSearchString, scmHost } RepositorySelector defines how to select repositories for workflow execution.
Combines a search string with an SCM host to identify repositories.
RepositorySelector defines how to select repositories for workflow execution. Combines a search string with an SCM host to identify repositories.
Search string to match repositories using SCM-specific search patterns. For GitHub: supports GitHub search syntax (e.g., “org:gitpod-io language:go”, “user:octocat stars:>100”) For GitLab: supports GitLab search syntax See SCM provider documentation for supported search patterns.
Manual trigger - executed when StartWorkflow RPC is called. No additional configuration needed.
pullRequest: optional object { events, integrationId, webhookId } Pull request trigger - executed when specified PR events occur.
Only triggers for PRs in repositories matching the trigger context.
Pull request trigger - executed when specified PR events occur. Only triggers for PRs in repositories matching the trigger context.
events: optional array of "PULL_REQUEST_EVENT_UNSPECIFIED" or "PULL_REQUEST_EVENT_OPENED" or "PULL_REQUEST_EVENT_UPDATED" or 4 more
AutomationRetrieveExecutionResponse object { workflowExecution }
WorkflowExecution represents a workflow execution instance.
WorkflowExecution represents a workflow execution instance.
metadata: optional object { creator, executor, finishedAt, 2 more } WorkflowExecutionMetadata contains workflow execution metadata.
WorkflowExecutionMetadata contains workflow execution metadata.
A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.
All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.
The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.
Examples
Example 1: Compute Timestamp from POSIX time().
Timestamp timestamp;
timestamp.set_seconds(time(NULL));
timestamp.set_nanos(0);
Example 2: Compute Timestamp from POSIX gettimeofday().
struct timeval tv;
gettimeofday(&tv, NULL);
Timestamp timestamp;
timestamp.set_seconds(tv.tv_sec);
timestamp.set_nanos(tv.tv_usec * 1000);
Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().
FILETIME ft;
GetSystemTimeAsFileTime(&ft);
UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
// A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
// is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
Timestamp timestamp;
timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
Example 4: Compute Timestamp from Java System.currentTimeMillis().
long millis = System.currentTimeMillis();
Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
.setNanos((int) ((millis % 1000) * 1000000)).build();
Example 5: Compute Timestamp from Java Instant.now().
Instant now = Instant.now();
Timestamp timestamp =
Timestamp.newBuilder().setSeconds(now.getEpochSecond())
.setNanos(now.getNano()).build();
Example 6: Compute Timestamp from current time in Python.
timestamp = Timestamp()
timestamp.GetCurrentTime()
JSON Mapping
In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).
For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.
In JavaScript, one can convert a Date object to this format using the
standard
toISOString()
method. In Python, a standard datetime.datetime object can be converted
to this format using
strftime with
the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use
the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.
A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.
All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.
The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.
Examples
Example 1: Compute Timestamp from POSIX time().
Timestamp timestamp;
timestamp.set_seconds(time(NULL));
timestamp.set_nanos(0);
Example 2: Compute Timestamp from POSIX gettimeofday().
struct timeval tv;
gettimeofday(&tv, NULL);
Timestamp timestamp;
timestamp.set_seconds(tv.tv_sec);
timestamp.set_nanos(tv.tv_usec * 1000);
Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().
FILETIME ft;
GetSystemTimeAsFileTime(&ft);
UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
// A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
// is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
Timestamp timestamp;
timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
Example 4: Compute Timestamp from Java System.currentTimeMillis().
long millis = System.currentTimeMillis();
Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
.setNanos((int) ((millis % 1000) * 1000000)).build();
Example 5: Compute Timestamp from Java Instant.now().
Instant now = Instant.now();
Timestamp timestamp =
Timestamp.newBuilder().setSeconds(now.getEpochSecond())
.setNanos(now.getNano()).build();
Example 6: Compute Timestamp from current time in Python.
timestamp = Timestamp()
timestamp.GetCurrentTime()
JSON Mapping
In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).
For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.
In JavaScript, one can convert a Date object to this format using the
standard
toISOString()
method. In Python, a standard datetime.datetime object can be converted
to this format using
strftime with
the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use
the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.
spec: optional object { action, report, trigger } WorkflowExecutionSpec contains the specification used for this execution.
WorkflowExecutionSpec contains the specification used for this execution.
WorkflowAction defines the actions to be executed in a workflow.
WorkflowAction defines the actions to be executed in a workflow.
limits: object { maxParallel, maxTotal, perExecution } Limits defines execution limits for workflow actions.
Concurrent actions limit cannot exceed total actions limit:
this.max_parallel <= this.max_total
Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:
this.max_parallel <= this.max_totalAutomation must have between 1 and 50 steps:
size(this) >= 1 && size(this) <= 50
Automation must have between 1 and 50 steps:
size(this) >= 1 && size(this) <= 50agent: optional object { prompt } WorkflowAgentStep represents an agent step that executes with a prompt.
WorkflowAgentStep represents an agent step that executes with a prompt.
WorkflowAction defines the actions to be executed in a workflow.
WorkflowAction defines the actions to be executed in a workflow.
limits: object { maxParallel, maxTotal, perExecution } Limits defines execution limits for workflow actions.
Concurrent actions limit cannot exceed total actions limit:
this.max_parallel <= this.max_total
Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:
this.max_parallel <= this.max_totalAutomation must have between 1 and 50 steps:
size(this) >= 1 && size(this) <= 50
Automation must have between 1 and 50 steps:
size(this) >= 1 && size(this) <= 50agent: optional object { prompt } WorkflowAgentStep represents an agent step that executes with a prompt.
WorkflowAgentStep represents an agent step that executes with a prompt.
trigger: optional object { context, manual, pullRequest, time } WorkflowExecutionTrigger represents a workflow execution trigger instance.
WorkflowExecutionTrigger represents a workflow execution trigger instance.
Context from the workflow trigger - copied at execution time for immutability.
This allows the reconciler to create actions without fetching the workflow definition.
Context from the workflow trigger - copied at execution time for immutability. This allows the reconciler to create actions without fetching the workflow definition.
agent: optional object { prompt } Execute workflow in agent-managed environments.
Agent receives the specified prompt and manages execution context.
Execute workflow in agent-managed environments. Agent receives the specified prompt and manages execution context.
Use context derived from the trigger event. Currently only supported for PullRequest triggers - uses PR repository context.
projects: optional object { projectIds } Execute workflow in specific project environments.
Creates environments for each specified project.
Execute workflow in specific project environments. Creates environments for each specified project.
repositories: optional object { environmentClassId, repoSelector, repositoryUrls } Execute workflow in environments created from repository URLs.
Supports both explicit repository URLs and search patterns.
Execute workflow in environments created from repository URLs. Supports both explicit repository URLs and search patterns.
repoSelector: optional object { repoSearchString, scmHost } RepositorySelector defines how to select repositories for workflow execution.
Combines a search string with an SCM host to identify repositories.
RepositorySelector defines how to select repositories for workflow execution. Combines a search string with an SCM host to identify repositories.
Search string to match repositories using SCM-specific search patterns. For GitHub: supports GitHub search syntax (e.g., “org:gitpod-io language:go”, “user:octocat stars:>100”) For GitLab: supports GitLab search syntax See SCM provider documentation for supported search patterns.
pullRequest: optional object { id, author, draft, 6 more } PullRequest represents pull request metadata from source control systems.
This message is used across workflow triggers, executions, and agent contexts
to maintain consistent PR information throughout the system.
PullRequest represents pull request metadata from source control systems. This message is used across workflow triggers, executions, and agent contexts to maintain consistent PR information throughout the system.
Pull request URL (e.g., “https://github.com/owner/repo/pull/123”)
time: optional object { triggeredAt } Time trigger - just the timestamp when it was triggered
Time trigger - just the timestamp when it was triggered
A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.
All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.
The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.
Examples
Example 1: Compute Timestamp from POSIX time().
Timestamp timestamp;
timestamp.set_seconds(time(NULL));
timestamp.set_nanos(0);
Example 2: Compute Timestamp from POSIX gettimeofday().
struct timeval tv;
gettimeofday(&tv, NULL);
Timestamp timestamp;
timestamp.set_seconds(tv.tv_sec);
timestamp.set_nanos(tv.tv_usec * 1000);
Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().
FILETIME ft;
GetSystemTimeAsFileTime(&ft);
UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
// A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
// is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
Timestamp timestamp;
timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
Example 4: Compute Timestamp from Java System.currentTimeMillis().
long millis = System.currentTimeMillis();
Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
.setNanos((int) ((millis % 1000) * 1000000)).build();
Example 5: Compute Timestamp from Java Instant.now().
Instant now = Instant.now();
Timestamp timestamp =
Timestamp.newBuilder().setSeconds(now.getEpochSecond())
.setNanos(now.getNano()).build();
Example 6: Compute Timestamp from current time in Python.
timestamp = Timestamp()
timestamp.GetCurrentTime()
JSON Mapping
In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).
For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.
In JavaScript, one can convert a Date object to this format using the
standard
toISOString()
method. In Python, a standard datetime.datetime object can be converted
to this format using
strftime with
the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use
the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.
status: optional object { doneActionCount, failedActionCount, failures, 5 more } WorkflowExecutionStatus contains the current status of a workflow execution.
WorkflowExecutionStatus contains the current status of a workflow execution.
failures: optional array of object { code, message, meta, 2 more } Structured failures that caused the workflow execution to fail.
Provides detailed error codes, messages, and retry information.
Structured failures that caused the workflow execution to fail. Provides detailed error codes, messages, and retry information.
code: optional "WORKFLOW_ERROR_CODE_UNSPECIFIED" or "WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR" or "WORKFLOW_ERROR_CODE_AGENT_ERROR"Error code identifying the type of error.
Error code identifying the type of error.
Additional metadata about the error. Common keys include:
- environment_id: ID of the environment
- task_id: ID of the task
- service_id: ID of the service
- workflow_id: ID of the workflow
- workflow_execution_id: ID of the workflow execution
phase: optional "WORKFLOW_EXECUTION_PHASE_UNSPECIFIED" or "WORKFLOW_EXECUTION_PHASE_PENDING" or "WORKFLOW_EXECUTION_PHASE_RUNNING" or 5 more
warnings: optional array of object { code, message, meta, 2 more } Structured warnings about the workflow execution.
Provides detailed warning codes and messages.
Structured warnings about the workflow execution. Provides detailed warning codes and messages.
code: optional "WORKFLOW_ERROR_CODE_UNSPECIFIED" or "WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR" or "WORKFLOW_ERROR_CODE_AGENT_ERROR"Error code identifying the type of error.
Error code identifying the type of error.
Additional metadata about the error. Common keys include:
- environment_id: ID of the environment
- task_id: ID of the task
- service_id: ID of the service
- workflow_id: ID of the workflow
- workflow_execution_id: ID of the workflow execution
AutomationRetrieveExecutionActionResponse object { workflowExecutionAction }
WorkflowExecutionAction represents a workflow execution action instance.
WorkflowExecutionAction represents a workflow execution action instance.
metadata: optional object { actionName, finishedAt, startedAt, 2 more } WorkflowExecutionActionMetadata contains workflow execution action metadata.
WorkflowExecutionActionMetadata contains workflow execution action metadata.
Human-readable name for this action based on its context. Examples: “gitpod-io/gitpod-next” for repository context, “My Project” for project context. Will be empty string for actions created before this field was added.
A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.
All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.
The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.
Examples
Example 1: Compute Timestamp from POSIX time().
Timestamp timestamp;
timestamp.set_seconds(time(NULL));
timestamp.set_nanos(0);
Example 2: Compute Timestamp from POSIX gettimeofday().
struct timeval tv;
gettimeofday(&tv, NULL);
Timestamp timestamp;
timestamp.set_seconds(tv.tv_sec);
timestamp.set_nanos(tv.tv_usec * 1000);
Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().
FILETIME ft;
GetSystemTimeAsFileTime(&ft);
UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
// A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
// is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
Timestamp timestamp;
timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
Example 4: Compute Timestamp from Java System.currentTimeMillis().
long millis = System.currentTimeMillis();
Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
.setNanos((int) ((millis % 1000) * 1000000)).build();
Example 5: Compute Timestamp from Java Instant.now().
Instant now = Instant.now();
Timestamp timestamp =
Timestamp.newBuilder().setSeconds(now.getEpochSecond())
.setNanos(now.getNano()).build();
Example 6: Compute Timestamp from current time in Python.
timestamp = Timestamp()
timestamp.GetCurrentTime()
JSON Mapping
In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).
For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.
In JavaScript, one can convert a Date object to this format using the
standard
toISOString()
method. In Python, a standard datetime.datetime object can be converted
to this format using
strftime with
the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use
the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.
A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.
All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.
The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.
Examples
Example 1: Compute Timestamp from POSIX time().
Timestamp timestamp;
timestamp.set_seconds(time(NULL));
timestamp.set_nanos(0);
Example 2: Compute Timestamp from POSIX gettimeofday().
struct timeval tv;
gettimeofday(&tv, NULL);
Timestamp timestamp;
timestamp.set_seconds(tv.tv_sec);
timestamp.set_nanos(tv.tv_usec * 1000);
Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().
FILETIME ft;
GetSystemTimeAsFileTime(&ft);
UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
// A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
// is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
Timestamp timestamp;
timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
Example 4: Compute Timestamp from Java System.currentTimeMillis().
long millis = System.currentTimeMillis();
Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
.setNanos((int) ((millis % 1000) * 1000000)).build();
Example 5: Compute Timestamp from Java Instant.now().
Instant now = Instant.now();
Timestamp timestamp =
Timestamp.newBuilder().setSeconds(now.getEpochSecond())
.setNanos(now.getNano()).build();
Example 6: Compute Timestamp from current time in Python.
timestamp = Timestamp()
timestamp.GetCurrentTime()
JSON Mapping
In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).
For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.
In JavaScript, one can convert a Date object to this format using the
standard
toISOString()
method. In Python, a standard datetime.datetime object can be converted
to this format using
strftime with
the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use
the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.
spec: optional object { context, limits } WorkflowExecutionActionSpec contains the specification for this execution action.
WorkflowExecutionActionSpec contains the specification for this execution action.
Context for the execution action - specifies where and how the action executes.
This is resolved from the workflow trigger context and contains the specific
project, repository, or agent context for this execution instance.
Context for the execution action - specifies where and how the action executes. This is resolved from the workflow trigger context and contains the specific project, repository, or agent context for this execution instance.
pullRequest: optional object { id, author, draft, 6 more } Pull request context - optional metadata about the PR being worked on
This is populated when the agent execution is triggered by a PR workflow
or when explicitly provided through the browser extension
Pull request context - optional metadata about the PR being worked on This is populated when the agent execution is triggered by a PR workflow or when explicitly provided through the browser extension
Pull request URL (e.g., “https://github.com/owner/repo/pull/123”)
status: optional object { agentExecutionId, environmentId, failures, 3 more } WorkflowExecutionActionStatus contains the current status of a workflow execution action.
WorkflowExecutionActionStatus contains the current status of a workflow execution action.
failures: optional array of object { code, message, meta, 2 more } Structured failures that caused the workflow execution action to fail.
Provides detailed error codes, messages, and retry information.
Structured failures that caused the workflow execution action to fail. Provides detailed error codes, messages, and retry information.
code: optional "WORKFLOW_ERROR_CODE_UNSPECIFIED" or "WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR" or "WORKFLOW_ERROR_CODE_AGENT_ERROR"Error code identifying the type of error.
Error code identifying the type of error.
Additional metadata about the error. Common keys include:
- environment_id: ID of the environment
- task_id: ID of the task
- service_id: ID of the service
- workflow_id: ID of the workflow
- workflow_execution_id: ID of the workflow execution
phase: optional "WORKFLOW_EXECUTION_ACTION_PHASE_UNSPECIFIED" or "WORKFLOW_EXECUTION_ACTION_PHASE_PENDING" or "WORKFLOW_EXECUTION_ACTION_PHASE_RUNNING" or 5 moreWorkflowExecutionActionPhase defines the phases of workflow execution action.
WorkflowExecutionActionPhase defines the phases of workflow execution action.
stepStatuses: optional array of object { error, finishedAt, phase, 3 more } Step-level progress tracking
Step-level progress tracking
error: optional object { code, message, meta, 2 more } Structured error that caused the step to fail.
Provides detailed error code, message, and retry information.
Structured error that caused the step to fail. Provides detailed error code, message, and retry information.
code: optional "WORKFLOW_ERROR_CODE_UNSPECIFIED" or "WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR" or "WORKFLOW_ERROR_CODE_AGENT_ERROR"Error code identifying the type of error.
Error code identifying the type of error.
Additional metadata about the error. Common keys include:
- environment_id: ID of the environment
- task_id: ID of the task
- service_id: ID of the service
- workflow_id: ID of the workflow
- workflow_execution_id: ID of the workflow execution
A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.
All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.
The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.
Examples
Example 1: Compute Timestamp from POSIX time().
Timestamp timestamp;
timestamp.set_seconds(time(NULL));
timestamp.set_nanos(0);
Example 2: Compute Timestamp from POSIX gettimeofday().
struct timeval tv;
gettimeofday(&tv, NULL);
Timestamp timestamp;
timestamp.set_seconds(tv.tv_sec);
timestamp.set_nanos(tv.tv_usec * 1000);
Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().
FILETIME ft;
GetSystemTimeAsFileTime(&ft);
UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
// A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
// is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
Timestamp timestamp;
timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
Example 4: Compute Timestamp from Java System.currentTimeMillis().
long millis = System.currentTimeMillis();
Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
.setNanos((int) ((millis % 1000) * 1000000)).build();
Example 5: Compute Timestamp from Java Instant.now().
Instant now = Instant.now();
Timestamp timestamp =
Timestamp.newBuilder().setSeconds(now.getEpochSecond())
.setNanos(now.getNano()).build();
Example 6: Compute Timestamp from current time in Python.
timestamp = Timestamp()
timestamp.GetCurrentTime()
JSON Mapping
In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).
For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.
In JavaScript, one can convert a Date object to this format using the
standard
toISOString()
method. In Python, a standard datetime.datetime object can be converted
to this format using
strftime with
the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use
the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.
A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.
All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.
The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.
Examples
Example 1: Compute Timestamp from POSIX time().
Timestamp timestamp;
timestamp.set_seconds(time(NULL));
timestamp.set_nanos(0);
Example 2: Compute Timestamp from POSIX gettimeofday().
struct timeval tv;
gettimeofday(&tv, NULL);
Timestamp timestamp;
timestamp.set_seconds(tv.tv_sec);
timestamp.set_nanos(tv.tv_usec * 1000);
Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().
FILETIME ft;
GetSystemTimeAsFileTime(&ft);
UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
// A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
// is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
Timestamp timestamp;
timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
Example 4: Compute Timestamp from Java System.currentTimeMillis().
long millis = System.currentTimeMillis();
Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
.setNanos((int) ((millis % 1000) * 1000000)).build();
Example 5: Compute Timestamp from Java Instant.now().
Instant now = Instant.now();
Timestamp timestamp =
Timestamp.newBuilder().setSeconds(now.getEpochSecond())
.setNanos(now.getNano()).build();
Example 6: Compute Timestamp from current time in Python.
timestamp = Timestamp()
timestamp.GetCurrentTime()
JSON Mapping
In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).
For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.
In JavaScript, one can convert a Date object to this format using the
standard
toISOString()
method. In Python, a standard datetime.datetime object can be converted
to this format using
strftime with
the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use
the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.
The step definition captured at execution time for immutability.
This ensures the UI shows the correct step even if the workflow definition changes.
The step definition captured at execution time for immutability. This ensures the UI shows the correct step even if the workflow definition changes.
agent: optional object { prompt } WorkflowAgentStep represents an agent step that executes with a prompt.
WorkflowAgentStep represents an agent step that executes with a prompt.
warnings: optional array of object { code, message, meta, 2 more } Structured warnings about the workflow execution action.
Provides detailed warning codes and messages.
Structured warnings about the workflow execution action. Provides detailed warning codes and messages.
code: optional "WORKFLOW_ERROR_CODE_UNSPECIFIED" or "WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR" or "WORKFLOW_ERROR_CODE_AGENT_ERROR"Error code identifying the type of error.
Error code identifying the type of error.
Additional metadata about the error. Common keys include:
- environment_id: ID of the environment
- task_id: ID of the task
- service_id: ID of the service
- workflow_id: ID of the workflow
- workflow_execution_id: ID of the workflow execution
AutomationStartExecutionResponse object { workflowExecution }
WorkflowExecution represents a workflow execution instance.
WorkflowExecution represents a workflow execution instance.
metadata: optional object { creator, executor, finishedAt, 2 more } WorkflowExecutionMetadata contains workflow execution metadata.
WorkflowExecutionMetadata contains workflow execution metadata.
A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.
All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.
The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.
Examples
Example 1: Compute Timestamp from POSIX time().
Timestamp timestamp;
timestamp.set_seconds(time(NULL));
timestamp.set_nanos(0);
Example 2: Compute Timestamp from POSIX gettimeofday().
struct timeval tv;
gettimeofday(&tv, NULL);
Timestamp timestamp;
timestamp.set_seconds(tv.tv_sec);
timestamp.set_nanos(tv.tv_usec * 1000);
Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().
FILETIME ft;
GetSystemTimeAsFileTime(&ft);
UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
// A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
// is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
Timestamp timestamp;
timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
Example 4: Compute Timestamp from Java System.currentTimeMillis().
long millis = System.currentTimeMillis();
Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
.setNanos((int) ((millis % 1000) * 1000000)).build();
Example 5: Compute Timestamp from Java Instant.now().
Instant now = Instant.now();
Timestamp timestamp =
Timestamp.newBuilder().setSeconds(now.getEpochSecond())
.setNanos(now.getNano()).build();
Example 6: Compute Timestamp from current time in Python.
timestamp = Timestamp()
timestamp.GetCurrentTime()
JSON Mapping
In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).
For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.
In JavaScript, one can convert a Date object to this format using the
standard
toISOString()
method. In Python, a standard datetime.datetime object can be converted
to this format using
strftime with
the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use
the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.
A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.
All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.
The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.
Examples
Example 1: Compute Timestamp from POSIX time().
Timestamp timestamp;
timestamp.set_seconds(time(NULL));
timestamp.set_nanos(0);
Example 2: Compute Timestamp from POSIX gettimeofday().
struct timeval tv;
gettimeofday(&tv, NULL);
Timestamp timestamp;
timestamp.set_seconds(tv.tv_sec);
timestamp.set_nanos(tv.tv_usec * 1000);
Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().
FILETIME ft;
GetSystemTimeAsFileTime(&ft);
UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
// A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
// is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
Timestamp timestamp;
timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
Example 4: Compute Timestamp from Java System.currentTimeMillis().
long millis = System.currentTimeMillis();
Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
.setNanos((int) ((millis % 1000) * 1000000)).build();
Example 5: Compute Timestamp from Java Instant.now().
Instant now = Instant.now();
Timestamp timestamp =
Timestamp.newBuilder().setSeconds(now.getEpochSecond())
.setNanos(now.getNano()).build();
Example 6: Compute Timestamp from current time in Python.
timestamp = Timestamp()
timestamp.GetCurrentTime()
JSON Mapping
In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).
For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.
In JavaScript, one can convert a Date object to this format using the
standard
toISOString()
method. In Python, a standard datetime.datetime object can be converted
to this format using
strftime with
the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use
the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.
spec: optional object { action, report, trigger } WorkflowExecutionSpec contains the specification used for this execution.
WorkflowExecutionSpec contains the specification used for this execution.
WorkflowAction defines the actions to be executed in a workflow.
WorkflowAction defines the actions to be executed in a workflow.
limits: object { maxParallel, maxTotal, perExecution } Limits defines execution limits for workflow actions.
Concurrent actions limit cannot exceed total actions limit:
this.max_parallel <= this.max_total
Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:
this.max_parallel <= this.max_totalAutomation must have between 1 and 50 steps:
size(this) >= 1 && size(this) <= 50
Automation must have between 1 and 50 steps:
size(this) >= 1 && size(this) <= 50agent: optional object { prompt } WorkflowAgentStep represents an agent step that executes with a prompt.
WorkflowAgentStep represents an agent step that executes with a prompt.
WorkflowAction defines the actions to be executed in a workflow.
WorkflowAction defines the actions to be executed in a workflow.
limits: object { maxParallel, maxTotal, perExecution } Limits defines execution limits for workflow actions.
Concurrent actions limit cannot exceed total actions limit:
this.max_parallel <= this.max_total
Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:
this.max_parallel <= this.max_totalAutomation must have between 1 and 50 steps:
size(this) >= 1 && size(this) <= 50
Automation must have between 1 and 50 steps:
size(this) >= 1 && size(this) <= 50agent: optional object { prompt } WorkflowAgentStep represents an agent step that executes with a prompt.
WorkflowAgentStep represents an agent step that executes with a prompt.
trigger: optional object { context, manual, pullRequest, time } WorkflowExecutionTrigger represents a workflow execution trigger instance.
WorkflowExecutionTrigger represents a workflow execution trigger instance.
Context from the workflow trigger - copied at execution time for immutability.
This allows the reconciler to create actions without fetching the workflow definition.
Context from the workflow trigger - copied at execution time for immutability. This allows the reconciler to create actions without fetching the workflow definition.
agent: optional object { prompt } Execute workflow in agent-managed environments.
Agent receives the specified prompt and manages execution context.
Execute workflow in agent-managed environments. Agent receives the specified prompt and manages execution context.
Use context derived from the trigger event. Currently only supported for PullRequest triggers - uses PR repository context.
projects: optional object { projectIds } Execute workflow in specific project environments.
Creates environments for each specified project.
Execute workflow in specific project environments. Creates environments for each specified project.
repositories: optional object { environmentClassId, repoSelector, repositoryUrls } Execute workflow in environments created from repository URLs.
Supports both explicit repository URLs and search patterns.
Execute workflow in environments created from repository URLs. Supports both explicit repository URLs and search patterns.
repoSelector: optional object { repoSearchString, scmHost } RepositorySelector defines how to select repositories for workflow execution.
Combines a search string with an SCM host to identify repositories.
RepositorySelector defines how to select repositories for workflow execution. Combines a search string with an SCM host to identify repositories.
Search string to match repositories using SCM-specific search patterns. For GitHub: supports GitHub search syntax (e.g., “org:gitpod-io language:go”, “user:octocat stars:>100”) For GitLab: supports GitLab search syntax See SCM provider documentation for supported search patterns.
pullRequest: optional object { id, author, draft, 6 more } PullRequest represents pull request metadata from source control systems.
This message is used across workflow triggers, executions, and agent contexts
to maintain consistent PR information throughout the system.
PullRequest represents pull request metadata from source control systems. This message is used across workflow triggers, executions, and agent contexts to maintain consistent PR information throughout the system.
Pull request URL (e.g., “https://github.com/owner/repo/pull/123”)
time: optional object { triggeredAt } Time trigger - just the timestamp when it was triggered
Time trigger - just the timestamp when it was triggered
A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.
All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.
The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.
Examples
Example 1: Compute Timestamp from POSIX time().
Timestamp timestamp;
timestamp.set_seconds(time(NULL));
timestamp.set_nanos(0);
Example 2: Compute Timestamp from POSIX gettimeofday().
struct timeval tv;
gettimeofday(&tv, NULL);
Timestamp timestamp;
timestamp.set_seconds(tv.tv_sec);
timestamp.set_nanos(tv.tv_usec * 1000);
Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().
FILETIME ft;
GetSystemTimeAsFileTime(&ft);
UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
// A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
// is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
Timestamp timestamp;
timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
Example 4: Compute Timestamp from Java System.currentTimeMillis().
long millis = System.currentTimeMillis();
Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
.setNanos((int) ((millis % 1000) * 1000000)).build();
Example 5: Compute Timestamp from Java Instant.now().
Instant now = Instant.now();
Timestamp timestamp =
Timestamp.newBuilder().setSeconds(now.getEpochSecond())
.setNanos(now.getNano()).build();
Example 6: Compute Timestamp from current time in Python.
timestamp = Timestamp()
timestamp.GetCurrentTime()
JSON Mapping
In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).
For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.
In JavaScript, one can convert a Date object to this format using the
standard
toISOString()
method. In Python, a standard datetime.datetime object can be converted
to this format using
strftime with
the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use
the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.
status: optional object { doneActionCount, failedActionCount, failures, 5 more } WorkflowExecutionStatus contains the current status of a workflow execution.
WorkflowExecutionStatus contains the current status of a workflow execution.
failures: optional array of object { code, message, meta, 2 more } Structured failures that caused the workflow execution to fail.
Provides detailed error codes, messages, and retry information.
Structured failures that caused the workflow execution to fail. Provides detailed error codes, messages, and retry information.
code: optional "WORKFLOW_ERROR_CODE_UNSPECIFIED" or "WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR" or "WORKFLOW_ERROR_CODE_AGENT_ERROR"Error code identifying the type of error.
Error code identifying the type of error.
Additional metadata about the error. Common keys include:
- environment_id: ID of the environment
- task_id: ID of the task
- service_id: ID of the service
- workflow_id: ID of the workflow
- workflow_execution_id: ID of the workflow execution
phase: optional "WORKFLOW_EXECUTION_PHASE_UNSPECIFIED" or "WORKFLOW_EXECUTION_PHASE_PENDING" or "WORKFLOW_EXECUTION_PHASE_RUNNING" or 5 more
warnings: optional array of object { code, message, meta, 2 more } Structured warnings about the workflow execution.
Provides detailed warning codes and messages.
Structured warnings about the workflow execution. Provides detailed warning codes and messages.
code: optional "WORKFLOW_ERROR_CODE_UNSPECIFIED" or "WORKFLOW_ERROR_CODE_ENVIRONMENT_ERROR" or "WORKFLOW_ERROR_CODE_AGENT_ERROR"Error code identifying the type of error.
Error code identifying the type of error.
Additional metadata about the error. Common keys include:
- environment_id: ID of the environment
- task_id: ID of the task
- service_id: ID of the service
- workflow_id: ID of the workflow
- workflow_execution_id: ID of the workflow execution
AutomationUpdateResponse object { workflow }
Workflow represents a workflow configuration.
Workflow represents a workflow configuration.
metadata: optional object { createdAt, creator, description, 3 more } WorkflowMetadata contains workflow metadata.
WorkflowMetadata contains workflow metadata.
A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.
All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.
The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.
Examples
Example 1: Compute Timestamp from POSIX time().
Timestamp timestamp;
timestamp.set_seconds(time(NULL));
timestamp.set_nanos(0);
Example 2: Compute Timestamp from POSIX gettimeofday().
struct timeval tv;
gettimeofday(&tv, NULL);
Timestamp timestamp;
timestamp.set_seconds(tv.tv_sec);
timestamp.set_nanos(tv.tv_usec * 1000);
Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().
FILETIME ft;
GetSystemTimeAsFileTime(&ft);
UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
// A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
// is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
Timestamp timestamp;
timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
Example 4: Compute Timestamp from Java System.currentTimeMillis().
long millis = System.currentTimeMillis();
Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
.setNanos((int) ((millis % 1000) * 1000000)).build();
Example 5: Compute Timestamp from Java Instant.now().
Instant now = Instant.now();
Timestamp timestamp =
Timestamp.newBuilder().setSeconds(now.getEpochSecond())
.setNanos(now.getNano()).build();
Example 6: Compute Timestamp from current time in Python.
timestamp = Timestamp()
timestamp.GetCurrentTime()
JSON Mapping
In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).
For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.
In JavaScript, one can convert a Date object to this format using the
standard
toISOString()
method. In Python, a standard datetime.datetime object can be converted
to this format using
strftime with
the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use
the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.
A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.
All minutes are 60 seconds long. Leap seconds are “smeared” so that no leap second table is needed for interpretation, using a 24-hour linear smear.
The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from RFC 3339 date strings.
Examples
Example 1: Compute Timestamp from POSIX time().
Timestamp timestamp;
timestamp.set_seconds(time(NULL));
timestamp.set_nanos(0);
Example 2: Compute Timestamp from POSIX gettimeofday().
struct timeval tv;
gettimeofday(&tv, NULL);
Timestamp timestamp;
timestamp.set_seconds(tv.tv_sec);
timestamp.set_nanos(tv.tv_usec * 1000);
Example 3: Compute Timestamp from Win32 GetSystemTimeAsFileTime().
FILETIME ft;
GetSystemTimeAsFileTime(&ft);
UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
// A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
// is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
Timestamp timestamp;
timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
Example 4: Compute Timestamp from Java System.currentTimeMillis().
long millis = System.currentTimeMillis();
Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
.setNanos((int) ((millis % 1000) * 1000000)).build();
Example 5: Compute Timestamp from Java Instant.now().
Instant now = Instant.now();
Timestamp timestamp =
Timestamp.newBuilder().setSeconds(now.getEpochSecond())
.setNanos(now.getNano()).build();
Example 6: Compute Timestamp from current time in Python.
timestamp = Timestamp()
timestamp.GetCurrentTime()
JSON Mapping
In JSON format, the Timestamp type is encoded as a string in the RFC 3339 format. That is, the format is “{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z” where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The “Z” suffix indicates the timezone (“UTC”); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by “Z”) when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset).
For example, “2017-01-15T01:30:15.01Z” encodes 15.01 seconds past 01:30 UTC on January 15, 2017.
In JavaScript, one can convert a Date object to this format using the
standard
toISOString()
method. In Python, a standard datetime.datetime object can be converted
to this format using
strftime with
the time format spec ‘%Y-%m-%dT%H:%M:%S.%fZ’. Likewise, in Java, one can use
the Joda Time’s ISODateTimeFormat.dateTime() to obtain a formatter capable of generating timestamps in this format.
spec: optional object { action, report, triggers }
WorkflowAction defines the actions to be executed in a workflow.
WorkflowAction defines the actions to be executed in a workflow.
limits: object { maxParallel, maxTotal, perExecution } Limits defines execution limits for workflow actions.
Concurrent actions limit cannot exceed total actions limit:
this.max_parallel <= this.max_total
Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:
this.max_parallel <= this.max_totalAutomation must have between 1 and 50 steps:
size(this) >= 1 && size(this) <= 50
Automation must have between 1 and 50 steps:
size(this) >= 1 && size(this) <= 50agent: optional object { prompt } WorkflowAgentStep represents an agent step that executes with a prompt.
WorkflowAgentStep represents an agent step that executes with a prompt.
WorkflowAction defines the actions to be executed in a workflow.
WorkflowAction defines the actions to be executed in a workflow.
limits: object { maxParallel, maxTotal, perExecution } Limits defines execution limits for workflow actions.
Concurrent actions limit cannot exceed total actions limit:
this.max_parallel <= this.max_total
Limits defines execution limits for workflow actions. Concurrent actions limit cannot exceed total actions limit:
this.max_parallel <= this.max_totalAutomation must have between 1 and 50 steps:
size(this) >= 1 && size(this) <= 50
Automation must have between 1 and 50 steps:
size(this) >= 1 && size(this) <= 50agent: optional object { prompt } WorkflowAgentStep represents an agent step that executes with a prompt.
WorkflowAgentStep represents an agent step that executes with a prompt.
WorkflowTriggerContext defines the context in which a workflow should run.
Context determines where and how the workflow executes:
- Projects: Execute in specific project environments
- Repositories: Execute in environments created from repository URLs
- Agent: Execute in agent-managed environments with custom prompts
- FromTrigger: Use context derived from the trigger event (PR-specific)
Context Usage by Trigger Type:
- Manual: Can use any context type
- Time: Typically uses Projects or Repositories context
- PullRequest: Can use any context, FromTrigger uses PR repository context
WorkflowTriggerContext defines the context in which a workflow should run.
Context determines where and how the workflow executes:
- Projects: Execute in specific project environments
- Repositories: Execute in environments created from repository URLs
- Agent: Execute in agent-managed environments with custom prompts
- FromTrigger: Use context derived from the trigger event (PR-specific)
Context Usage by Trigger Type:
- Manual: Can use any context type
- Time: Typically uses Projects or Repositories context
- PullRequest: Can use any context, FromTrigger uses PR repository context
agent: optional object { prompt } Execute workflow in agent-managed environments.
Agent receives the specified prompt and manages execution context.
Execute workflow in agent-managed environments. Agent receives the specified prompt and manages execution context.
Use context derived from the trigger event. Currently only supported for PullRequest triggers - uses PR repository context.
projects: optional object { projectIds } Execute workflow in specific project environments.
Creates environments for each specified project.
Execute workflow in specific project environments. Creates environments for each specified project.
repositories: optional object { environmentClassId, repoSelector, repositoryUrls } Execute workflow in environments created from repository URLs.
Supports both explicit repository URLs and search patterns.
Execute workflow in environments created from repository URLs. Supports both explicit repository URLs and search patterns.
repoSelector: optional object { repoSearchString, scmHost } RepositorySelector defines how to select repositories for workflow execution.
Combines a search string with an SCM host to identify repositories.
RepositorySelector defines how to select repositories for workflow execution. Combines a search string with an SCM host to identify repositories.
Search string to match repositories using SCM-specific search patterns. For GitHub: supports GitHub search syntax (e.g., “org:gitpod-io language:go”, “user:octocat stars:>100”) For GitLab: supports GitLab search syntax See SCM provider documentation for supported search patterns.
Manual trigger - executed when StartWorkflow RPC is called. No additional configuration needed.
pullRequest: optional object { events, integrationId, webhookId } Pull request trigger - executed when specified PR events occur.
Only triggers for PRs in repositories matching the trigger context.
Pull request trigger - executed when specified PR events occur. Only triggers for PRs in repositories matching the trigger context.