Skip to content

docs: add CONTRIBUTING.md as a best-practices reference for contributors#92

Open
rmiki-dev wants to merge 1 commit intocontainers:mainfrom
rmiki-dev:add-contributing
Open

docs: add CONTRIBUTING.md as a best-practices reference for contributors#92
rmiki-dev wants to merge 1 commit intocontainers:mainfrom
rmiki-dev:add-contributing

Conversation

@rmiki-dev
Copy link
Copy Markdown
Collaborator

@rmiki-dev rmiki-dev commented May 4, 2026

CONTRIBUTING.md file to guide new contributors through the development workflow, commit requirements, and PR process for the tar-diff project.

A "Contributing to tar-diff" section has also been added to README.md directing users to the guide

The key sections in this PR include:

  • Prerequisites and setup
  • Development workflow
  • DCO signoff and commit signing requirements
  • Conventional commits format with examples
  • Testing and validation instructions
  • Code quality standards and PR process
  • Merge vs squash strategy for clean git history

Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a comprehensive CONTRIBUTING.md file outlining the project's development workflow, commit standards, and testing procedures. Feedback was provided to correct a typo and remove trailing whitespace in the introduction, as well as to update the minimum Go version requirement to 1.26 to align with the project's go.mod file.

Comment thread CONTRIBUTING.md Outdated
Comment thread CONTRIBUTING.md Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented May 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.37%. Comparing base (afb00d4) to head (2faade9).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #92      +/-   ##
==========================================
+ Coverage   72.87%   79.37%   +6.49%     
==========================================
  Files          10       10              
  Lines        1412     1115     -297     
==========================================
- Hits         1029      885     -144     
+ Misses        271      133     -138     
+ Partials      112       97      -15     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rmiki-dev rmiki-dev force-pushed the add-contributing branch 2 times, most recently from 1e65cf6 to 2339171 Compare May 5, 2026 12:42
Signed-off-by: Rosy-Glorious Miki <rmiki@redhat.com>
@rmiki-dev rmiki-dev force-pushed the add-contributing branch from 2339171 to 2faade9 Compare May 5, 2026 14:40
Copy link
Copy Markdown
Collaborator

@kgiusti kgiusti left a comment

Choose a reason for hiding this comment

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

Thanks for adding this! I had a couple of recommendations for you to consider - see inline.

Comment thread CONTRIBUTING.md
git checkout -b my-feature-branch
```

2. **Make your changes** and commit them (see commit guidelines below)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I would move the commit part of the sentence to after steps 3 and 4, and emphasize that all the tests and validation (steps 3 and 4) must pass before the commit is created.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I agree. I would also add a link to the commit guidelines.

Comment thread CONTRIBUTING.md
# Contributing to Tar-diff

Thank you for your interest in Tar-diff! We appreciate contributions that help improve this library and maintain high code quality. This guide covers everything you need to know to contribute effectively to the project.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I would recommend adding a Note: here about the licensing requirement. Something like:

This project is licensed under the Apache License 2.0. By contributing, you agree that your contributions will be licensed under the same terms.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I agree. Just one note, I would write 'Apache License, Version 2.0' to unify it with what is written in the README.md file.

Comment thread CONTRIBUTING.md
@@ -0,0 +1,200 @@
# Contributing to Tar-diff
Copy link
Copy Markdown
Collaborator

@knecasov knecasov May 7, 2026

Choose a reason for hiding this comment

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

I would write 'Contributing to tar-diff'. It means that I would replace 'Tar-diff' with tar-diff in general.

Comment thread CONTRIBUTING.md
Comment on lines +9 to +12
- **Go** >= 1.26 (see [go.mod](go.mod))
- **make**
- **tar**
- **diffutils**, **bzip2**, **gzip** (for tests)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I would use the same formatting as here.

Comment thread CONTRIBUTING.md
git push origin my-feature-branch
```

6. **Open a Pull Request** against the `main` branch of the upstream repository
Copy link
Copy Markdown
Collaborator

@knecasov knecasov May 7, 2026

Choose a reason for hiding this comment

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

I would write 'pull request (PR)'.

Comment thread CONTRIBUTING.md

6. **Open a Pull Request** against the `main` branch of the upstream repository

## Sign Your Commits (DCO)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I would remove '(DCO)'.

Comment thread CONTRIBUTING.md

## Sign Your Commits (DCO)

All commits must be signed off to certify that you agree to the [Developer Certificate of Origin](https://developercertificate.org/).
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Comment thread CONTRIBUTING.md

All commits must be signed off to certify that you agree to the [Developer Certificate of Origin](https://developercertificate.org/).

To sign your commits, use the `-s` flag
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

There is a missing dot.

Comment thread CONTRIBUTING.md

All commits must have **verified signatures** (shown as a "Verified" badge on GitHub). This is enforced by branch protection rules - commits without verified signatures will be rejected.

To set up commit signing, see [GitHub's documentation on commit signature verification](https://docs.github.com/en/authentication/managing-commit-signature-verification).
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I would write 'see GitHub's documentation on commit signature verification'.

Comment thread CONTRIBUTING.md

Before submitting a PR, ensure all local tests pass:

### Run all tests:
Copy link
Copy Markdown
Collaborator

@knecasov knecasov May 7, 2026

Choose a reason for hiding this comment

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

Consider using a consistent heading style for '###' titles - for example, '### Commit Types' vs. '### Run all tests:'.

Comment thread CONTRIBUTING.md
This runs:
- `golangci-lint` for linting
- `go vet` for static analysis
- `gofmt` check for formatting
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I would skip 'check'.

Comment thread CONTRIBUTING.md
- Test on multiple platforms when possible
- The CI pipeline will test your changes on all supported platforms

## Pull Request Process
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The abbreviation 'PR' should be introduced earlier so that 'PR Process' can be used as the heading.

Comment thread CONTRIBUTING.md
- Maintainers will review your PR
- Address any feedback or requested changes
- Keep your branch up to date with `main` to minimize merge conflicts
- **Comment resolution**: The person who opens a review comment is responsible for resolving it once the feedback has been addressed
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We did some modifications to the comment resolution (it is not so strict). It should maybe be incorporated here.

Comment thread CONTRIBUTING.md
git commit --amend -s
```

**Note:** All commits in your PR must be signed off. PRs with unsigned commits will not be merged.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I would write 'Note:' to unify it with other similar occurrences.

Comment thread CONTRIBUTING.md
- Open a new issue if needed
- Feel free to ask questions in your PR

Thank you for contributing to tar-diff :)!
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I would write tar-diff.

Comment thread README.md

The `tar-diff` file format is described in [file-format.md](file-format.md).

## Contributing to tar-diff
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I would write tar-diff.

Comment thread README.md

## Contributing to tar-diff

Interested in collaborating on tar-diff? Check out our [CONTRIBUTING.md](CONTRIBUTING.md) guide to help get you started!
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I would write tar-diff and CONTRIBUTING.md.

Comment thread README.md
Comment on lines 52 to 54
This is particularly useful for e.g. bootc images, where only the files in the ostree repo
will be available on the system. For that case you would run tar-diff with
`--source-prefix=sysroot/ostree/repo/objects/`
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I would write 'This is particularly useful for bootc images, for example, where only the files in the ostree repository will be available on the system. In that case, you would run tar-diff with --source-prefix=sysroot/ostree/repo/objects/.'.

I know it is not related to the changes in this PR. I just wanted to share this suggestion with you.

Copy link
Copy Markdown
Collaborator

@knecasov knecasov 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 several comments.

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