Skip to content

feat: allow doc-changelog to select Towncrier config file - #1567

Merged
jorgepiloto merged 15 commits into
mainfrom
fix/952-doc-changelog-config
Oct 28, 2026
Merged

jorgepiloto merged 15 commits into
mainfrom
fix/952-doc-changelog-config

Conversation

@jorgepiloto

Copy link
Copy Markdown
Member

This change adds a config-file input to ansys/actions/doc-changelog so maintainers can choose which Towncrier config file to use. The action now defaults to pyproject.toml, supports towncrier.toml when explicitly set, and fails with a clear error if the selected file or [tool.towncrier] section is missing.

It also wires the selected config file through both Towncrier config-reading steps and updates the usage example. Closes #952.

@jorgepiloto
jorgepiloto requested a review from a team as a code owner September 16, 2026 08:27
@github-actions github-actions Bot added the fix Pull requests related to resolving problems or errors label Sep 16, 2026

@SMoraisAnsys SMoraisAnsys 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.

LGTM. Since we don't test the use of towncrier.toml in our CI, could you check that the changes work in a test repo ?

Comment thread doc-changelog/action.yml Resolved

@clatapie clatapie 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.

LGTM with the same test question as @SMoraisAnsys

@klmcadams klmcadams 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.

LGTM with same testing comment as @SMoraisAnsys & @clatapie

@RobPasMue

Copy link
Copy Markdown
Member

Have we finally performed the testing on this PR? Just wondering if we can merge it

@jorgepiloto

Copy link
Copy Markdown
Member Author

Thanks @SMoraisAnsys. I tested this in a sandbox repo (https://github.com/jorgepiloto/test-doc-changelog, one PR per scenario):

  • Only pyproject.toml: works.
  • Both files with config-file: towncrier.toml: works, the fragment goes to the towncrier.toml directory and pyproject.toml is untouched.
  • Only towncrier.toml with the default input: this failed (pyproject.toml was not found), unlike main. Fixed in 1bf27c6, which falls back to towncrier.toml and reuses the resolved file in the next step.
  • config-file pointing to a missing file: fails with a clear message.
  • Both files with the default input: still resolves pyproject.toml, same as main. Use config-file: towncrier.toml to select the other file.

On the TOWNCRIER_CONFIG_FILE suggestion: the step now reads the resolved value from the previous step, so both places are consistent.

@SMoraisAnsys SMoraisAnsys 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.

Thanks for the extra tests

@jorgepiloto

Copy link
Copy Markdown
Member Author

Thank you all for the review

@jorgepiloto
jorgepiloto merged commit 28ca03e into main Oct 28, 2026
91 checks passed
@jorgepiloto
jorgepiloto deleted the fix/952-doc-changelog-config branch October 28, 2026 09:57
moe-ad pushed a commit that referenced this pull request Nov 3, 2026
Co-authored-by: Copilot <[email protected]>
Co-authored-by: pyansys-ci-bot <[email protected]>
Co-authored-by: Sébastien Morais <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Pull requests related to resolving problems or errors

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provide option to specify configuration file for doc-changelog action

6 participants