Skip to content

Fix help text of URL options to list the actually supported schemes#1396

Open
palas wants to merge 1 commit into
masterfrom
fix-anchor-url-help-messages
Open

Fix help text of URL options to list the actually supported schemes#1396
palas wants to merge 1 commit into
masterfrom
fix-anchor-url-help-messages

Conversation

@palas

@palas palas commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Context

The help for hash anchor-data --url claimed that only HTTP(S) and IPFS URLs are supported, but the URL is fetched with allSchemes, which also accepts file:// URLs. Conversely, --pool-metadata-url (stake-pool metadata-hash) and --drep-metadata-url (governance drep metadata-hash), which are also fetched with allSchemes, did not document which schemes they accept at all.

This PR updates the help for these command so that it correctly describes the supported schemas.

How to trust this PR

Check the messages are written correctly and that the implementation of these commands indeed use allSchemes.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. See Running tests for more details
  • Self-reviewed the diff
  • Changelog fragment added in .changes/

The help for `hash anchor-data --url` claimed that only HTTP(S) and
IPFS URLs are supported, but the URL is fetched with `allSchemes`,
which also accepts file:// URLs. Conversely, `--pool-metadata-url`
(`stake-pool metadata-hash`) and `--drep-metadata-url` (`governance
drep metadata-hash`), which are also fetched with `allSchemes`, did
not document which schemes they accept at all.
@palas palas self-assigned this Jul 18, 2026
Copilot AI review requested due to automatic review settings July 18, 2026 04:44

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.

Pull request overview

Updates Cardano CLI option help text so URL-taking commands accurately document the URL schemes they support (matching the underlying use of allSchemes).

Changes:

  • Document supported URL schemes (file, http, https, ipfs) for hash anchor-data --url.
  • Document supported URL schemes for stake-pool metadata-hash --pool-metadata-url and governance drep metadata-hash --drep-metadata-url.
  • Update golden help fixtures and add a changelog fragment.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
cardano-cli/test/cardano-cli-golden/files/golden/help/latest_stake-pool_metadata-hash.cli Updates golden help output to include supported schemes for --pool-metadata-url.
cardano-cli/test/cardano-cli-golden/files/golden/help/latest_governance_drep_metadata-hash.cli Updates golden help output to include supported schemes for --drep-metadata-url.
cardano-cli/test/cardano-cli-golden/files/golden/help/hash_anchor-data.cli Updates golden help output to reflect broader supported schemes for --url.
cardano-cli/test/cardano-cli-golden/files/golden/help/conway_stake-pool_metadata-hash.cli Updates Conway-era golden help output for --pool-metadata-url.
cardano-cli/test/cardano-cli-golden/files/golden/help/conway_governance_drep_metadata-hash.cli Updates Conway-era golden help output for --drep-metadata-url.
cardano-cli/test/cardano-cli-golden/files/golden/help/compatible_conway_governance_drep_metadata-hash.cli Updates compatible-Conway golden help output for --drep-metadata-url.
cardano-cli/src/Cardano/CLI/EraIndependent/Hash/Option.hs Updates hash anchor-data --url help string to list supported schemes.
cardano-cli/src/Cardano/CLI/EraBased/StakePool/Option.hs Updates --pool-metadata-url help string to list supported schemes.
cardano-cli/src/Cardano/CLI/EraBased/Governance/DRep/Option.hs Updates --drep-metadata-url help string to list supported schemes.
.changes/20260718_044307_cardano-cli_pablo.lamela_fix_anchor_url_help_messages.yml Adds changelog fragment for the help-text update.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1 to +2
description: Fix help messages in anchor hashing functions to display the right protocols
supported
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants