Skip to content

CLI-1860: Updated response to include download links. - #2028

Merged
deepakmishra2 merged 3 commits into
mainfrom
CLI-1860
Oct 6, 2026
Merged

deepakmishra2 merged 3 commits into
mainfrom
CLI-1860

Conversation

@vishalkhode1

Copy link
Copy Markdown
Contributor

No description provided.

@github-actions

Copy link
Copy Markdown
Contributor

Try the dev build for this PR: https://acquia-cli.s3.amazonaws.com/build/pr/2028/acli.phar

curl -OL https://acquia-cli.s3.amazonaws.com/build/pr/2028/acli.phar
chmod +x acli.phar

@codecov

codecov Bot commented Jul 24, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.77%. Comparing base (40de030) to head (c0e0eba).

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #2028   +/-   ##
=========================================
  Coverage     92.76%   92.77%           
- Complexity     2032     2037    +5     
=========================================
  Files           126      126           
  Lines          7337     7345    +8     
=========================================
+ Hits           6806     6814    +8     
  Misses          531      531           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@deepakmishra2 deepakmishra2 changed the title CLI-1860: Updated resoponse to include download links. CLI-1860: Updated response to include download links. Jul 24, 2026

@deepakmishra2 deepakmishra2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also add test for api:site-instances:database:backups with a _links.download fixture and asserts the download URL is preserved.

$this->assertArrayNotHasKey('_links', $decoded[0]);
$this->assertArrayNotHasKey('_links', $decoded[1]);
$this->assertArrayHasKey('_links', $decoded[0]);
$this->assertEmpty($decoded[0]['_links']);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and once we have the test we can change this assertion to assertArrayNotHasKey('_links', ...) for fixtures without a download key

@acquia-stalebot-platauto

Copy link
Copy Markdown

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please remove the stale label to avoid it being closed. Thank you for your contributions. More info: https://github.com/acquia/devops-github-administration/blob/main/docs/operations_related_to_repositories.md#acquia-stale-bot

@acquia-stalebot-platauto

Copy link
Copy Markdown

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please remove the stale label to avoid it being closed. Thank you for your contributions. More info: https://github.com/acquia/devops-github-administration/blob/main/docs/operations_related_to_repositories.md#acquia-stale-bot

@acquia-stalebot-platauto

Copy link
Copy Markdown

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please remove the stale label to avoid it being closed. Thank you for your contributions. More info: https://github.com/acquia/devops-github-administration/blob/main/docs/operations_related_to_repositories.md#acquia-stale-bot

@acquia-stalebot-platauto

Copy link
Copy Markdown

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please remove the stale label to avoid it being closed. Thank you for your contributions. More info: https://github.com/acquia/devops-github-administration/blob/main/docs/operations_related_to_repositories.md#acquia-stale-bot

@deepakmishra2
deepakmishra2 marked this pull request as ready for review October 6, 2026 05:14
Copilot AI balanced review requested due to automatic review settings October 6, 2026 05:14
@deepakmishra2

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The focused filtering change has corresponding regression coverage and no identified blocking issues.

Review effort: Balanced
Findings: None

What changed in this PR

Updates API response filtering to preserve download links while removing other link entries.

Changes:

  • Retains _links.download for object and array responses.
  • Updates existing assertions and adds download-link regression tests.
File Description
tests/​phpunit/​src/​Commands/​Api/​ApiCommandTest.php Tests download-link preservation and filtering of other links.
src/​Command/​Api/​ApiBaseCommand.php Filters _links instead of removing it entirely.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

# Conflicts:
#	tests/phpunit/src/Commands/Api/ApiCommandTest.php

Co-authored-by: deepakmishra2 <108808209+deepakmishra2@users.noreply.github.com>
@deepakmishra2
deepakmishra2 merged commit fb20a25 into main Oct 6, 2026
26 checks passed
@deepakmishra2
deepakmishra2 deleted the CLI-1860 branch October 6, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants