Skip to content

ci: pf-4128 contribution policy workflow#194

Open
cdcabrera wants to merge 2 commits into
patternfly:mainfrom
cdcabrera:pf-4128-workflows
Open

ci: pf-4128 contribution policy workflow#194
cdcabrera wants to merge 2 commits into
patternfly:mainfrom
cdcabrera:pf-4128-workflows

Conversation

@cdcabrera
Copy link
Copy Markdown
Member

@cdcabrera cdcabrera commented May 11, 2026

What is it?

  • ci: pf-4128 contribution policy workflow
    • build, workflow package audit, combined PR gatekeeper, commits, integration
    • testing, scripts testing for workflows

Notes

  • workflow scripting broken out to help reviews
  • the integration workflow and support scripts require being checked in before the Gatekeeper policy will pass

Updates issue/story

related #193
updates #190
pf-4128

@cdcabrera cdcabrera force-pushed the pf-4128-workflows branch 2 times, most recently from 56a7eb6 to 8674b84 Compare May 12, 2026 18:28
@cdcabrera cdcabrera force-pushed the pf-4128-workflows branch from 8674b84 to 27b74a2 Compare May 12, 2026 20:40
@cdcabrera cdcabrera marked this pull request as ready for review May 12, 2026 20:41
Copy link
Copy Markdown
Contributor

@nicolethoen nicolethoen left a comment

Choose a reason for hiding this comment

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

Took a look primarily at the copy

Comment thread scripts/workflow.preCheck.js Outdated
Comment thread scripts/workflow.preCheck.js Outdated
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` +
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.

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` +
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.

All pre-checks pass! Your contribution is queued for review. Thank you for following our guidelines!

Comment thread scripts/workflow.preCheck.js Outdated
Comment thread scripts/workflow.preCheck.js Outdated
Comment thread scripts/workflow.preCheck.js
Comment thread scripts/workflow.preCheck.js Outdated
Comment thread scripts/workflow.preCheck.js Outdated
Comment thread scripts/workflow.preCheck.js Outdated
Comment thread scripts/workflow.preCheck.js Outdated
Comment thread scripts/workflow.preCheck.js
* build, workflow package audit, policy PR gatekeeper, commits, integration
* testing, scripts testing for workflows
@cdcabrera
Copy link
Copy Markdown
Member Author

cdcabrera commented May 13, 2026

So we ended up refactoring the messages again @nicolethoen ... it may alter your comments

  1. the draft variation had to be removed, it just melted in testing
  2. outside contributors received nothing in testing, no labels, no comments. what we're about to add into this is they now receive logging with the same "comments" and a "label" subset. this should improve the overall experience
  3. and we ended up refactor messages after a bot reviewer implied the content was written by a soulless machine ... whoops

@cdcabrera cdcabrera force-pushed the pf-4128-workflows branch from 27b74a2 to b60aa20 Compare May 13, 2026 16:52
@cdcabrera cdcabrera changed the title build: pf-4128 contribution workflow actions build: pf-4128 contribution policy workflow May 13, 2026
@cdcabrera cdcabrera changed the title build: pf-4128 contribution policy workflow ci: pf-4128 contribution policy workflow May 13, 2026
dlabaj
dlabaj previously approved these changes May 13, 2026
Copy link
Copy Markdown

@dlabaj dlabaj left a comment

Choose a reason for hiding this comment

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

Looks good

Copy link
Copy Markdown
Contributor

@nicolethoen nicolethoen left a comment

Choose a reason for hiding this comment

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

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.

Comment thread scripts/workflow.preCheck.js Outdated
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.`);
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.

⚠️ Large changeset detected (${fileCount} files, guideline: ${fileChangeLimit}). Resolution: Smaller PRs are easier to review and merge faster. Please split these changes into focused PRs, each addressing a single concern.

Comment thread scripts/workflow.preCheck.js Outdated
}

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.`);
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.

⚠️ Core file modifications detected (${coreModified.join(', ')}). Resolution: Please link the related issue in your PR description. If no issue exists, please create one first so we can discuss the approach. How to create an issue

Comment thread scripts/workflow.preCheck.js Outdated
}

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.`);
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.

⚠️ Changes detected to security-sensitive files... Resolution: These files (workflows, scripts, package configuration) require a core contributor's security review before merging.

Comment thread scripts/workflow.preCheck.js Outdated
}

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.`);
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.

⚠️ Changes to agent instruction guidelines detected (${guidelinesModified.join(', ')}). Resolution: Modifications to AI agent instructions require maintainer review for security and quality. Please explain your changes in the PR description, attach the related issue, and a maintainer will review.

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) {
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.

⚠️ Changes detected to test fixture/mock directories (${extraModified.join(', ')}). These don't match our testing structure. Resolution: Please review our testing guidelines or ask in your PR description how to structure your tests. A maintainer will provide guidance.

Copy link
Copy Markdown
Member Author

@cdcabrera cdcabrera May 13, 2026

Choose a reason for hiding this comment

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

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

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants