ci: pf-4128 contribution policy workflow#194
Conversation
56a7eb6 to
8674b84
Compare
8674b84 to
27b74a2
Compare
nicolethoen
left a comment
There was a problem hiding this comment.
Took a look primarily at the copy
| if (codeSignature.hasTell) { | ||
| const botComment = `### 🤖 PR Quality Guidance\n` + | ||
| `I've moved this to **Draft** due to the scope of changes, and to avoid confusion.\n` + | ||
| `Once you've focused your changes I'll take another look.\n\n` + |
There was a problem hiding this comment.
Once you've addressed these items, I'll re-check your changes. Thank you for your contribution!
| } else { | ||
| // Or confirm the work has passed pre-check | ||
| const successComment = `### 🤖 PR Quality Guidance\n` + | ||
| `I finished my scan and all pre-checks pass!\n\n` + |
There was a problem hiding this comment.
All pre-checks pass! Your contribution is queued for review. Thank you for following our guidelines!
* build, workflow package audit, policy PR gatekeeper, commits, integration * testing, scripts testing for workflows
|
So we ended up refactoring the messages again @nicolethoen ... it may alter your comments
|
27b74a2 to
b60aa20
Compare
nicolethoen
left a comment
There was a problem hiding this comment.
I added suggestions back with suggestions for the messages.
I tried removing 'you' and 'i' statements to make it sound more direct/actionable and a bit less first person.
| const errors = []; | ||
|
|
||
| if (isMaxFilesUpdated === true) { | ||
| errors.push(`⚠️ You've updated a lot of files (${fileCount}/${fileChangeLimit}). **Resolution:** To ensure a smooth review, please consider reducing the scope of these changes by splitting them into smaller, more focused PR contributions.`); |
There was a problem hiding this comment.
| } | ||
|
|
||
| if (isCoreModified) { | ||
| errors.push(`⚠️ I detected core file modifications. To help us track and plan your work, please ensure these updates are associated with a GitHub issue (${coreModified.join(', ')}). **Resolution:** Link a GitHub issue in your PR description. Starting with an issue ensures your work is recognized and aligned with the roadmap.`); |
There was a problem hiding this comment.
| } | ||
|
|
||
| if (isSecModified) { | ||
| errors.push(`⚠️ I've found updates to security-sensitive files (${secModified.join(', ')}). **Resolution:** These changes require a core contributor's review. You can remove these changes or provide a clear explanation for these updates in your PR description.`); |
There was a problem hiding this comment.
| } | ||
|
|
||
| if (isAgentModified) { | ||
| errors.push(`⚠️ I found modifications to agent guidelines (${agentModified.join(', ')}). **Resolution:** Changes to shared guidelines require architectural alignment. Please coordinate these updates through a GitHub issue first.`); |
There was a problem hiding this comment.
| errors.push(`⚠️ I detected core file modifications. To help us track and plan your work, please ensure these updates are associated with a GitHub issue (${coreModified.join(', ')}). **Resolution:** Link a GitHub issue in your PR description. Starting with an issue ensures your work is recognized and aligned with the roadmap.`); | ||
| } | ||
|
|
||
| if (isExtraModified) { |
There was a problem hiding this comment.
There was a problem hiding this comment.
This one we're going to have to tweak more... these lists we're leveraging can include both "test" and "code".
Inviting discussion on aligning to an established pattern vs creating an entirely new one based on an internal preference feels like an unresolvable thing (def way more talking than we want). I'll tweak it to remove the "I" for sure, but I'll fiddle with it
|
With If I'm understanding this correctly, someone can submit a working, tested fix — and their build fails. Not because their code is broken, but because of which files they touched. What are they supposed to do next? I think this is a possible scenario — a contributor adds a new MCP tool with full test coverage, updates snapshots, writes a detailed PR description by hand. They've seemingly done everything right, but because they touched 16 files, hit a few paths on the core list, and didn't preserve a hidden metadata string from the PR template — |
nicolethoen
left a comment
There was a problem hiding this comment.
Jeff raised good point. The scenario he described is real — contributor does everything right (working code, tests, snapshots) but CI fails on metadata/file count. CODEOWNERS already enforces maintainer review on every file, so automation doesn't add protection — just friction.
Some things we could consider:
- Keep warnings/labels as guidance
- Remove hard CI failure from hasTell
- Drop isPrTemplateModified and isGenModified from failure conditions
- CODEOWNERS is actual gate, let automation inform maintainer review instead of blocking it
Our own bot messaging in this PR emphasizes "starting with a conversation helps ensure your contribution is integrated smoothly." Fewer CI failure gates communicates we're open to conversation. Contributors still get all feedback and warnings — just not blocked from maintainer review.
| `- Consider splitting your changes into smaller, focused PR contributions.\n\n` + | ||
| `Starting with a conversation helps ensure your contribution is integrated smoothly. Once you've focused your changes, I'll take another look.\n\n` + | ||
| `**Labels**: \`${LABEL_NEEDS_CLEANUP}\`, \`${LABEL_PRECHECKS_FAIL}\` \n\n` + | ||
| `_Read our [contribution guidelines](https://github.com/patternfly/patternfly-mcp/blob/main/CONTRIBUTING.md). This comment updates automatically._`; |
There was a problem hiding this comment.
### 🤖 PR Quality Guidance\n +
This PR has been flagged for a **Policy Hold** to ensure alignment with quality, security, and architectural standards.\n\n +
**To resolve this hold and move forward**:\n +
- Associate updates with a GitHub issue (Step 1 of the [Contributor's Journey (https://github.com/patternfly/patternfly-mcp/blob/main/CONTRIBUTING.md#step-1-start-a-conversation)).\n +
- Align changes with codebase style and remove excessive scope.\n +
- Consider splitting changes into smaller, focused PR contributions.\n\n +
Starting with a conversation helps ensure contributions are integrated smoothly.\n\n +
**Labels**: \${LABEL_NEEDS_CLEANUP}`, `${LABEL_PRECHECKS_FAIL}` \n\n+Read our contribution guidelines. This comment updates automatically.`
| `I found some issues with your work. Once the following updates are addressed, you'll be queued for review:\n\n` + | ||
| `${codeSignature.errors.map(err => `- ${err}`).join('\n')}\n\n` + | ||
| `**Labels**: \`${LABEL_NEEDS_CLEANUP}\` \n\n` + | ||
| `_Read our [contribution guidelines](https://github.com/patternfly/patternfly-mcp/blob/main/CONTRIBUTING.md). This comment updates automatically._`; |
There was a problem hiding this comment.
### 🤖 PR Quality Guidance\n +
The following issues need to be addressed before this PR can be queued for review:\n\n +
${codeSignature.errors.map(err => - ${err}).join('\n')}\n\n +
**Labels**: \${LABEL_NEEDS_CLEANUP}` \n\n+Read our contribution guidelines. This comment updates automatically.`
What is it?
Notes
Updates issue/story
related #193
updates #190
pf-4128