Repository navigation
feat: add config-driven check-pr validation - #1706
Conversation
|
@cchanche this is currently only a github action but I wonder if we should introduce it in CLI or support the different forge adapters. So something like this: |
|
Yeah this sounds good to me.
Would import {PRTitleValidator} from @release-drafter/check-pr-title
...
const isValid = PRTitleValidator.validate(title)... ? Also, I like to think about changes in a more generic way (instead of simple PRs). Maybe this could be a higher level validator for any type of change. We'd omit a body and a footer for PR titles, and include them (sometimes) for commits. On top of doing the PR categorization stuff, we would prepare for whenever we want to implement commits into what we consider as possible changes. |
|
Well ya thinking about it we could prepare it for semantic commit and semantic pr title support 👍 |
|
but then about the gh-action side of things, it would only make sense for the PR-titles I guess. So maybe two pacakges then ? One for the actual action |
8749767 to
734d52b
Compare
|
I think change-validator could live in core cause |
0af10d4 to
4580d84
Compare
4580d84 to
fdb71b5
Compare
|
Updated the stack around the design discussed here:
The Action uses the GitHub event payload directly, so it remains small and needs no forge request or separate package. |
eb5670f to
3afaeaa
Compare
3afaeaa to
7a03e87
Compare
0728393 to
dde81c5
Compare
dde81c5 to
f9472b0
Compare
f9472b0 to
9e68ab6
Compare
9e68ab6 to
388f287
Compare
737494d to
557fd89
Compare
557fd89 to
22a1d5f
Compare
22a1d5f to
59a7176
Compare
59a7176 to
a9b995a
Compare
Summary
check-prAction that validates the current pull request with the normal Release Drafter configuration.@release-drafter/coreinstead of creating another package.release-drafter check-pr <repository> <number>so the CLI uses the same policy.PullRequestReadercontract and implement it for GitHub.check-pr/action.ymland generate its inputs through the Action metadata tooling from feat: move GitHub Actions into workspace #1705.Validation behavior
conventionalvalidate the title.The Action reads the title, labels, and base branch from the pull request event. It does not fetch changed files or modify the pull request, so its example workflow needs only
contents: read.The CLI fetches one pull request, loads configuration from its base branch, and returns 0 for valid or skipped, 1 for invalid, and 2 for command or runtime errors.
Dependency changes
No new package or external runtime dependency. Gitea, Forgejo, and GitLab readers follow in #1707 and #1708.
Validation
npm run cinpm run check:cleanStack
Stacked on #1720. Alternate forge readers follow in #1707 and #1708.
Closes #1695.
Review size
+1,152 -45across 39 files+1,725 -1,567across 5 filesGitHub's headline total includes both rows.
.gitattributesmarks generated artifacts and collapses their diffs by default.