Skip to content

OCPEDGE-2543: add CONTRIBUTING.md - #100

Open
fonta-rh wants to merge 2 commits into
openshift-eng:mainfrom
fonta-rh:ocpedge-2543-contributing-md
Open

OCPEDGE-2543: add CONTRIBUTING.md#100
fonta-rh wants to merge 2 commits into
openshift-eng:mainfrom
fonta-rh:ocpedge-2543-contributing-md

Conversation

@fonta-rh

@fonta-rh fonta-rh commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add CONTRIBUTING.md covering the full contributor workflow
  • Sections: getting started, contribution types, dev workflow, code standards, testing, security, documentation, commit conventions, PR process
  • Targets broader Red Hat engineering audience (knows OpenShift, may be new to TNT)

References

Summary by CodeRabbit

  • Documentation
    • Added comprehensive contribution guidelines covering setup, development workflows, coding standards, testing, security, documentation, commits, and pull requests.

Contributor guide covering fork model, development workflow, code
standards, testing, security, documentation, commit conventions,
and PR process.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 31, 2026
@openshift-ci-robot

openshift-ci-robot commented Jul 31, 2026

Copy link
Copy Markdown

@fonta-rh: This pull request references OCPEDGE-2543 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Summary

  • Add CONTRIBUTING.md covering the full contributor workflow
  • Sections: getting started, contribution types, dev workflow, code standards, testing, security, documentation, commit conventions, PR process
  • Targets broader Red Hat engineering audience (knows OpenShift, may be new to TNT)

References

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci
openshift-ci Bot requested review from eggfoobar and slintes July 31, 2026 15:53
@openshift-ci

openshift-ci Bot commented Jul 31, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fonta-rh

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 31, 2026
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 98ff037c-5461-4b26-9d07-6daf592c81d0

📥 Commits

Reviewing files that changed from the base of the PR and between baf3437 and 7a58c31.

📒 Files selected for processing (1)
  • CONTRIBUTING.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • CONTRIBUTING.md

Walkthrough

Added CONTRIBUTING.md with guidance for repository setup, development workflows, coding standards, testing, security, documentation, commits, and pull requests.

Changes

Contribution Guidance

Layer / File(s) Summary
Setup and development workflow
CONTRIBUTING.md
Documents repository setup, contribution areas, branch naming, verification, linting, formatting, and documentation maintenance.
Standards, validation, and review requirements
CONTRIBUTING.md
Defines language standards, testing requirements, security practices, commit conventions, and pull request expectations.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Suggested reviewers: slintes, eggfoobar

🚥 Pre-merge checks | ✅ 10 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Ai-Attribution ⚠️ Warning AI use is explicit: commits name Claude and CodeRabbit, but use prohibited Co-Authored-By trailers and contain no Assisted-by or Generated-by trailer. Replace AI Co-Authored-By trailers with the required Red Hat-approved Assisted-by or Generated-by trailers, or remove the AI attribution if no AI tool was used.
✅ Passed checks (10 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: adding contributor guidance in CONTRIBUTING.md.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
No-Weak-Crypto ✅ Passed The PR adds only CONTRIBUTING.md; scans of all added lines found no weak algorithms, custom crypto, crypto APIs, or non-constant-time secret comparisons.
Container-Privileges ✅ Passed The PR changes only CONTRIBUTING.md; it adds no container/Kubernetes manifest or prohibited privilege setting, and exact checks found no privileged, host*, SYS_ADMIN, or escalation values.
No-Sensitive-Data-In-Logs ✅ Passed The PR adds only CONTRIBUTING.md; it contains no logging code or concrete credentials, tokens, PII, hostnames, or customer data. Its security guidance explicitly warns against leaking credentials.
No-Hardcoded-Secrets ✅ Passed The changed CONTRIBUTING.md contains no hardcoded secret, credential-bearing URL, private-key block, long base64 value, or sensitive variable assigned a literal.
No-Injection-Vectors ✅ Passed The PR adds only CONTRIBUTING.md; its full 154-line diff contains no listed injection sinks, and repository-wide sink scans found no matches.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot added the ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review label Jul 31, 2026

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 4

🧹 Nitpick comments (1)
CONTRIBUTING.md (1)

151-152: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Update the OWNERS references.

Use the exact aliases from OWNERS: edge-enablement-approvers and team-dragonfly-approvers.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@CONTRIBUTING.md` around lines 151 - 152, Update the OWNERS references in the
review guidance to use the exact aliases edge-enablement-approvers and
team-dragonfly-approvers instead of the shorter team names.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@CONTRIBUTING.md`:
- Around line 98-106: Make the Python ruff requirement executable by updating
the Makefile: add a maintained ruff target and include it in the verify target
alongside shellcheck, yamlfmt, and ansible-lint. Ensure make verify runs the
documented Python lint check locally.
- Around line 62-68: Update the lint behavior documentation in CONTRIBUTING.md:
state that make shellcheck only lints without modifying files, make yamlfmt
formats files by default, and make verify runs both commands in validate-only
mode without modifications.
- Around line 22-25: Update the container-based linter workflow documentation to
reflect the OPENSHIFT_CI behavior: ensure hack/yamlfmt.sh safely handles an
unset OPENSHIFT_CI value using an empty default, and document that setting
OPENSHIFT_CI makes all three scripts run locally with the required local-tool
prerequisites, or remove those local-tool branches so the documented container
workflow remains accurate.
- Around line 18-21: Update the commit-signing guidance in the contributor setup
steps to recommend GPG or SSH signing without stating that the repository
enforces signatures or rejects unsigned commits. Retain the link to GitHub’s
signing documentation.

---

Nitpick comments:
In `@CONTRIBUTING.md`:
- Around line 151-152: Update the OWNERS references in the review guidance to
use the exact aliases edge-enablement-approvers and team-dragonfly-approvers
instead of the shorter team names.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 112f7526-1a29-4744-8c1a-26bcfcc4c18b

📥 Commits

Reviewing files that changed from the base of the PR and between e1adc4e and baf3437.

📒 Files selected for processing (1)
  • CONTRIBUTING.md

Comment thread CONTRIBUTING.md
Comment on lines +18 to +21
3. Set up commit signing (GPG or SSH). The repo enforces signature
verification — unsigned commits are rejected. See [GitHub's signing
docs](https://docs.github.com/en/authentication/managing-commit-signature-verification)
for setup instructions.

@coderabbitai coderabbitai Bot Jul 31, 2026

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.

🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

gh api repos/openshift-eng/two-node-toolbox/branches/main/protection/required_signatures \
  --jq '.enabled'

Repository: openshift-eng/two-node-toolbox

Length of output: 399


🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '%s\n' '--- CONTRIBUTING.md ---'
sed -n '1,60p' CONTRIBUTING.md

printf '%s\n' '--- repository policy references ---'
rg -n -i 'signed commit|commit signing|signature|unsigned|ruleset|branch protection|protected branch' \
  -g '!CONTRIBUTING.md' -g '!*.lock' . || true

printf '%s\n' '--- public GitHub branch and ruleset metadata ---'
curl -fsSL -H 'Accept: application/vnd.github+json' \
  https://api.github.com/repos/openshift-eng/two-node-toolbox/branches/main \
  | jq '{name, protected, protection_url, required_signatures_url: ._links.self.href}'

curl -sS -D /tmp/tnt-ruleset-headers \
  -o /tmp/tnt-rulesets.json \
  -H 'Accept: application/vnd.github+json' \
  https://api.github.com/repos/openshift-eng/two-node-toolbox/rulesets
printf '%s\n' '--- rulesets response status ---'
head -n 1 /tmp/tnt-ruleset-headers
cat /tmp/tnt-rulesets.json

Repository: openshift-eng/two-node-toolbox

Length of output: 2489


🏁 Script executed:

#!/bin/bash
set -euo pipefail

curl -fsSL -H 'Accept: application/vnd.github+json' \
  https://api.github.com/repos/openshift-eng/two-node-toolbox/branches/main/protection/required_signatures \
  | jq .

Repository: openshift-eng/two-node-toolbox

Length of output: 219


🌐 Web query:

openshift-eng/two-node-toolbox main branch signed commits required signatures ruleset

💡 Result:

As of July 31, 2026, the openshift-eng/two-node-toolbox repository does not have a publicly visible GitHub ruleset enforced that mandates signed commits [1]. While commit signature verification is a common practice for security in OpenShift-related repositories, commit history in this repository shows that both signed and unsigned commits have been accepted [2][3][4][5][6]. Specifically, while many recent commits are marked as "Verified" (often associated with automated processes or contributors with configured GPG/SSH signing keys) [2][3][5][6], there is no indication from the repository's configuration that signed commits are a mandatory requirement enforced via a GitHub ruleset. You can verify the active rulesets for any public GitHub repository by navigating to the "Rulesets" tab in the repository settings (if you have appropriate permissions) or by appending /rules to the repository URL (e.g., https://github.com/openshift-eng/two-node-toolbox/rules) [7]. GitHub rulesets, when configured, can mandate signed commits for all pushes to target branches [8][9][10].

Citations:


Correct the commit-signing guidance.

The repository does not publicly enforce signed commits on main, so unsigned commits are not guaranteed to be rejected. Recommend GPG or SSH signing without claiming repository enforcement.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@CONTRIBUTING.md` around lines 18 - 21, Update the commit-signing guidance in
the contributor setup steps to recommend GPG or SSH signing without stating that
the repository enforces signatures or rejects unsigned commits. Retain the link
to GitHub’s signing documentation.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Won't fix — commit signature verification was recently enabled on this repo. The enforcement claim is accurate.

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.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

gh api \
  repos/openshift-eng/two-node-toolbox/branches/main/protection/required_signatures \
  --jq '{enabled: .enabled}'

Length of output: 693


@fonta-rh, verification failed because the GitHub integration cannot read the branch-protection endpoint. It returned HTTP 403: Resource not accessible by integration.

Please retry with credentials that can read main branch protection, or provide the enabled setting from the repository configuration. I will leave the finding unresolved until the setting is verifiable.


✏️ Learnings added
Learnt from: fonta-rh
Repo: openshift-eng/two-node-toolbox PR: 100
File: CONTRIBUTING.md:18-21
Timestamp: 2026-07-31T16:20:25.876Z
Learning: For `openshift-eng/two-node-toolbox`, maintainer `fonta-rh` states that GitHub commit signature verification was recently enabled. Guidance in `CONTRIBUTING.md` may accurately state that unsigned commits are rejected, but reviewers must verify the current `main` branch protection setting because the policy can change.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

You are interacting with an AI system.

Comment thread CONTRIBUTING.md
Comment thread CONTRIBUTING.md Outdated
Comment thread CONTRIBUTING.md Outdated
Auto-applied:
- CONTRIBUTING.md:62-68: shellcheck is read-only, not auto-fix

Accepted after review:
- CONTRIBUTING.md:98-100: clarify ruff is checked by CodeRabbit, not make verify

Co-Authored-By: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@fonta-rh

Copy link
Copy Markdown
Contributor Author

Re: CodeRabbit nitpick — use exact OWNERS alias names

Won't fix — the short names (edge-enablement, team-dragonfly) are more readable for a contributor guide. The full alias names (edge-enablement-approvers, edge-enablement-reviewers, etc.) would add noise without helping contributors who don't interact with OWNERS files directly.

@coderabbitai coderabbitai Bot removed the ready-for-human-review Indicates a PR has been reviewed by automated tools and is ready for human review label Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants