diff --git a/.cardano-dev.yaml b/.cardano-dev.yaml deleted file mode 100644 index e39231c182..0000000000 --- a/.cardano-dev.yaml +++ /dev/null @@ -1,22 +0,0 @@ -version: 2 -main-branch: main -release-branch: - prefix: release/ - suffix: .x -changelog: - # Determine which PR changelog options are available and which end up in the changelog - options: - type: - feature: add - breaking: add - compatible: add - optimisation: add - bugfix: add - refactoring: skip - test: skip - maintenance: skip - release: skip - documentation: skip - - # deprecated, left here only for backwards compatible changelog generation - improvement: add diff --git a/.changes/20260327_185614_cardano-rpc_mateusz.galazyn.yml b/.changes/20260327_185614_cardano-rpc_mateusz.galazyn.yml new file mode 100644 index 0000000000..9590d7d3c8 --- /dev/null +++ b/.changes/20260327_185614_cardano-rpc_mateusz.galazyn.yml @@ -0,0 +1,5 @@ +description: unimportant refactoring +kind: +- refactoring +pr: 1234 +project: cardano-rpc diff --git a/.changes/20260327_185614_cardano-wasm_mateusz.galazyn.yml b/.changes/20260327_185614_cardano-wasm_mateusz.galazyn.yml new file mode 100644 index 0000000000..ea3811b3fe --- /dev/null +++ b/.changes/20260327_185614_cardano-wasm_mateusz.galazyn.yml @@ -0,0 +1,5 @@ +description: unimportant refactoring +kind: +- refactoring +pr: 1234 +project: cardano-wasm diff --git a/.changes/20260327_185802_cardano-rpc_mateusz.galazyn.yml b/.changes/20260327_185802_cardano-rpc_mateusz.galazyn.yml new file mode 100644 index 0000000000..5668bd0baa --- /dev/null +++ b/.changes/20260327_185802_cardano-rpc_mateusz.galazyn.yml @@ -0,0 +1,6 @@ +description: Fixed some bug +kind: +- bugfix +- compatible +pr: 1235 +project: cardano-rpc diff --git a/.changes/_TEMPLATE.yml b/.changes/_TEMPLATE.yml new file mode 100644 index 0000000000..7760f13bd0 --- /dev/null +++ b/.changes/_TEMPLATE.yml @@ -0,0 +1,16 @@ +# Changelog fragment template - copy this file and fill in the fields. +# Or use 'herald new' for interactive creation. +# +# Files starting with _ are ignored by herald. +# +# Available projects and kinds are defined in .herald.yml + +# Which project this change belongs to (see 'projects' in .herald.yml) +project: my-project +# Pull request number associated with this change +pr: 0 +# One or more change kinds (see 'kinds' in .herald.yml) +kind: + - bugfix +description: | + Describe your change here. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index a9c5713a73..86afb55121 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,28 +1,22 @@ # Changelog -```yaml -- description: | - -# uncomment types applicable to the change: - type: - # - feature # introduces a new feature - # - breaking # the API has changed in a breaking way - # - compatible # the API has changed but is non-breaking - # - optimisation # measurable performance improvements - # - refactoring # QoL changes - # - bugfix # fixes a defect - # - test # fixes/modifies tests - # - maintenance # not directly related to the code - # - release # related to a new release preparation - # - documentation # change in code docs, haddocks... -# uncomment at least one main project this PR is associated with - projects: - # - cardano-api - # - cardano-api-gen - # - cardano-rpc - # - cardano-wasm +Every PR needs a changelog fragment in `.changes/`. Create one with: + +```bash +herald new +``` + +Or non-interactively: + +```bash +herald new -p cardano-api -k bugfix -d "Fix something" --pr 1234 ``` +Available projects: `cardano-api`, `cardano-api-gen`, `cardano-rpc`, `cardano-wasm` +Available kinds: `breaking`, `feature`, `compatible`, `bugfix`, `optimisation`, `refactoring`, `test`, `maintenance`, `release`, `documentation` + +See `.herald.yml` for full configuration. CI will validate your fragment automatically. + # Context Additional context for the PR goes here. If the PR fixes a particular issue please provide a [link](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword=) to the issue. @@ -36,6 +30,7 @@ Highlight important bits of the PR that will make the review faster. If there ar - [ ] Commit sequence broadly makes sense and commits have useful messages - [ ] New tests are added if needed and existing tests are updated. See [Running tests](https://github.com/input-output-hk/cardano-node-wiki/wiki/Running-tests) for more details - [ ] Self-reviewed the diff +- [ ] Changelog fragment added in `.changes/` - diff --git a/cardano-api/src/Cardano/Api/Pretty.hs b/cardano-api/src/Cardano/Api/Pretty.hs index 30ba6ad79b..8947d7aadc 100644 --- a/cardano-api/src/Cardano/Api/Pretty.hs +++ b/cardano-api/src/Cardano/Api/Pretty.hs @@ -12,6 +12,7 @@ module Cardano.Api.Pretty , renderBuildable , textShow , pshow + , pshow2 , prettyException , hsep , vsep @@ -89,6 +90,11 @@ white = annotate (color White) pshow :: Show a => a -> Doc ann pshow = viaShow + +-- | Short hand for 'viaShow'. +pshow2 :: Show a => a -> Doc ann +pshow2 = viaShow + -- | Short hand for @'pretty' . 'displayException'@ prettyException :: Exception a => a -> Doc ann prettyException = pretty . displayException