Skip to content

feat: guardrails against symbols in PR titles - #1597

Merged
moe-ad merged 5 commits into
mainfrom
feat/guardrails-against-symbols-in-pr-titles
Oct 22, 2026
Merged

moe-ad merged 5 commits into
mainfrom
feat/guardrails-against-symbols-in-pr-titles

Conversation

@moe-ad

@moe-ad moe-ad commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Closes #696. See #697 also for more context.

Typical error will be like this sample run: https://github.com/ansys/actions/actions/runs/39223603727/job/117964813877?pr=1597#step:3:177.

I chose to run the check both in check-pr-title and doc-changelog actions to make sure the check takes place regardless of how users combine both actions. Is this overkill @ansys/pyansys-core?

Also ! ( ) : - / _ . , < > = " are the only characters accepted so far. Are there other characters you think should be accepted @ansys/pyansys-core ?

@github-actions github-actions Bot added enhancement General improvements to existing features ci Pipelines maintenance related docs Issues related to documentation labels Oct 12, 2026
@moe-ad
moe-ad force-pushed the feat/guardrails-against-symbols-in-pr-titles branch from bdd43d6 to c3c4a4e Compare October 19, 2026 08:32
@moe-ad moe-ad changed the title feat: guardrails against symbols in PR titles feat: guardrails against symbols in *PR titles Oct 19, 2026
@moe-ad moe-ad changed the title feat: guardrails against symbols in *PR titles feat: guardrails against symbols in PR titles Oct 19, 2026
@moe-ad
moe-ad marked this pull request as ready for review October 19, 2026 08:46
@moe-ad
moe-ad requested a review from a team as a code owner October 19, 2026 08:46
Comment thread python-utils/parse_pr.py Resolved
Comment thread python-utils/parse_pr.py Resolved
@klmcadams

Copy link
Copy Markdown
Contributor

How about make check-pr-titles a requirement for doc-changleog to run if they're using both actions at once? That'll prevent double failures since they both check for PR title compliance (I think)

@moe-ad

moe-ad commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

How about make check-pr-titles a requirement for doc-changleog to run if they're using both actions at once? That'll prevent double failures since they both check for PR title compliance (I think)

It would have been nice if we could do this, but we have no way of knowing how jobs in an executing workflow have been set up. Or do you mean simply stating it in the docs?

@klmcadams

Copy link
Copy Markdown
Contributor

How about make check-pr-titles a requirement for doc-changleog to run if they're using both actions at once? That'll prevent double failures since they both check for PR title compliance (I think)

It would have been nice if we could do this, but we have no way of knowing how jobs in an executing workflow have been set up. Or do you mean simply stating it in the docs?

True, I think you could state it in the docs and I could make an automated check for this scenario

Comment thread python-utils/test_parse_pr.py Resolved
@RobPasMue

RobPasMue commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

How about make check-pr-titles a requirement for doc-changleog to run if they're using both actions at once? That'll prevent double failures since they both check for PR title compliance (I think)

It would have been nice if we could do this, but we have no way of knowing how jobs in an executing workflow have been set up. Or do you mean simply stating it in the docs?

Couldn't we simply run it as part of the doc-changelog action? Like we do with the license action in the wheelhouse action?

@moe-ad

moe-ad commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

How about make check-pr-titles a requirement for doc-changleog to run if they're using both actions at once? That'll prevent double failures since they both check for PR title compliance (I think)

It would have been nice if we could do this, but we have no way of knowing how jobs in an executing workflow have been set up. Or do you mean simply stating it in the docs?

Couldn't we simply run it as part of the doc-changelog action? Like we do with the license action in the wheelhouse action?

It already runs as part of the doc-changelog action, but only when the use-pull-request-title option is true (the option is false by default). So my thought process is that we can have 3 scenarios:

  • Those using check-pr-title action alone.
  • Those using doc-changelog action alone.
  • Those using both.

That's why I am running the check on both actions to cover all scenarios. Which means in the case of both actions (with use-pull-request-title also set to true), the check will happen twice. That is what I meant by "overkill".

Comment thread python-utils/test_parse_pr.py Resolved
@moe-ad

moe-ad commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

We probably want to add a couple of extra symbols to accommodate bot PRs like build(pip): update click requirement from <9,>=8.3.3 to >=8.4.0,<9 and GitHub revert PR titles like Revert "feat: ...".

@jorgepiloto

jorgepiloto commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

How about make check-pr-titles a requirement for doc-changleog to run if they're using both actions at once? That'll prevent double failures since they both check for PR title compliance (I think)

It would have been nice if we could do this, but we have no way of knowing how jobs in an executing workflow have been set up. Or do you mean simply stating it in the docs?

Couldn't we simply run it as part of the doc-changelog action? Like we do with the license action in the wheelhouse action?

It already runs as part of the doc-changelog action, but only when the use-pull-request-title option is true (the option is false by default). So my thought process is that we can have 3 scenarios:

  • Those using check-pr-title action alone.
  • Those using doc-changelog action alone.
  • Those using both.

That's why I am running the check on both actions to cover all scenarios. Which means in the case of both actions (with use-pull-request-title also set to true), the check will happen twice. That is what I meant by "overkill".

What about making the check-pr-title private and enforcing it in the doc-changelog action? I don't see any case where users want them to be separate.

Maybe we can do this in a separate pull with the idea of v12 in mind.

@moe-ad

moe-ad commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor Author

How about make check-pr-titles a requirement for doc-changleog to run if they're using both actions at once? That'll prevent double failures since they both check for PR title compliance (I think)

It would have been nice if we could do this, but we have no way of knowing how jobs in an executing workflow have been set up. Or do you mean simply stating it in the docs?

Couldn't we simply run it as part of the doc-changelog action? Like we do with the license action in the wheelhouse action?

It already runs as part of the doc-changelog action, but only when the use-pull-request-title option is true (the option is false by default). So my thought process is that we can have 3 scenarios:

  • Those using check-pr-title action alone.
  • Those using doc-changelog action alone.
  • Those using both.

That's why I am running the check on both actions to cover all scenarios. Which means in the case of both actions (with use-pull-request-title also set to true), the check will happen twice. That is what I meant by "overkill".

What about making the check-pr-title private and enforcing it in the doc-changelog action? I don't see any case where users want them to be separate.

Maybe we can do this in a separate pull with the idea of v12 in mind.

We probably shouldn't do this. Here is a quick breakdown of how repos use both actions in the Ansys org:

  • Both (33)
  • Only check-pr-title (10)
  • Only doc-changelog (30)

@moe-ad
moe-ad merged commit 7d275fa into main Oct 22, 2026
107 of 109 checks passed
@moe-ad
moe-ad deleted the feat/guardrails-against-symbols-in-pr-titles branch October 22, 2026 12:07
moe-ad added a commit that referenced this pull request Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Pipelines maintenance related docs Issues related to documentation enhancement General improvements to existing features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add syntax check on the changelog action

8 participants