8000 add workflows to make sure docs keep in sync with core changes by LordSimal · Pull Request #18944 · cakephp/cakephp · GitHub
[go: up one dir, main page]

Skip to content

Conversation

LordSimal
Copy link
Contributor
@LordSimal LordSimal commented Oct 5, 2025

This is my attempt to automate our outdated docs problem. The workflows should be rather self-explanatory.

The new PR template would look like this:


Summary

Please describe the reason for the changes you're proposing. If it is a large change, please open an issue to discuss first.

Always follow the contribution guidelines when submitting a pull request.

In particular, make sure existing tests still pass, and add tests for all new behavior.

When fixing a bug, you may want to add a test to verify the fix.

Documentation

@LordSimal LordSimal force-pushed the 5.x-docs-workflows branch 3 times, most recently from ecdb597 to c1fd3b7 Compare October 5, 2025 11:42
@LordSimal
Copy link
Contributor Author
LordSimal commented Oct 5, 2025

I have not found an easy way to check referenced issues/pr's so the easiest way is to link the PR in the description as seen above.

It also doesn't check, if the linked docs PR is open, merged or closed, but thats a minor detail imho.

The only thing that needs to be done manually is if a PR with no doc changes is created by someone, who can't remove labels. Then a core memeber just needs to remove the needs documentation label and the CI should get green automatically.

Comment on lines +4 to +7
on:
pull_request:
types: [opened]

Copy link
Member

Choose a reason for hiding this comment

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

We typically only need documentation added for new features. Should this action (and its friends) only target the *.next branches?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, the main doc updates are probably needed in the .next branch as well as the next major branch

// Rule: Must either have no "needs documentation" label
// OR have a linked docs PR in the description
const hasLabel = labels.includes("needs documentation")
const hasDocsLink = /\bhttps:\/\/github\.com\/cakephp\/docs\/pull\/\d+\b/.test(pr.body || "")
Copy link
Member

Choose a reason for hiding this comment

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

Should we also look for docs links in comments?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd say no, because it could link to another docs PR which is not responsible for this change.

Editing the description of the PR is easy and enforces a bit of structure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0