Skip to content

feat: Add --json flag support to apify push#1025

Merged
vladfrangu merged 2 commits into
masterfrom
copilot/support-json-option-apify-push
Feb 24, 2026
Merged

feat: Add --json flag support to apify push#1025
vladfrangu merged 2 commits into
masterfrom
copilot/support-json-option-apify-push

Conversation

Copilot AI commented Feb 24, 2026

Copy link
Copy Markdown
Contributor

apify push had no machine-readable output, making it impossible for downstream tools to access the resulting build object programmatically (e.g. in CI pipelines or the push-actor-action).

Changes

  • src/commands/actors/push.ts
    • Enable --json flag via static override enableJsonFlag = true
    • After retrieving the final build object, output it as JSON and return early when --json is passed — consistent with how builds create handles it

Progress/status messages continue going to stderr; the build object is emitted to stdout only when --json is set.

Usage

apify push --json
# stdout: raw Build object as JSON
# stderr: progress messages (Info:, Run:, Warning:, etc.)

Example output:

{
  "id": "abc123",
  "actId": "xyz789",
  "status": "SUCCEEDED",
  "buildNumber": "0.0.1",
  ...
}
Original prompt

This section details on the original issue you should resolve

<issue_title>Support --json option with the apify push command</issue_title>
<issue_description>Many other CLI commands support the --json option as a way of consuming the output data programmatically.

apify push doesn't have support for this (unlike e.g. builds create). Users pushing Actors with the CLI now cannot access the resulting builds directly. See a downstream dependency issue.</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: vladfrangu <17960496+vladfrangu@users.noreply.github.com>
Copilot AI changed the title [WIP] Support --json option with apify push command Add --json flag support to apify push Feb 24, 2026
Copilot AI requested a review from vladfrangu February 24, 2026 14:11
@vladfrangu vladfrangu changed the title Add --json flag support to apify push feat: Add --json flag support to apify push Feb 24, 2026
@github-actions github-actions Bot added this to the 135th sprint - Tooling team milestone Feb 24, 2026
@github-actions github-actions Bot added the t-tooling Issues with this label are in the ownership of the tooling team. label Feb 24, 2026
@vladfrangu vladfrangu marked this pull request as ready for review February 24, 2026 14:43
@vladfrangu vladfrangu merged commit baf39bb into master Feb 24, 2026
22 of 23 checks passed
@vladfrangu vladfrangu deleted the copilot/support-json-option-apify-push branch February 24, 2026 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support --json option with the apify push command

4 participants