Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add git --signoff to contributing.md #156

Merged
merged 1 commit into from
Oct 26, 2023
Merged

Conversation

AriESQ
Copy link
Contributor

@AriESQ AriESQ commented Oct 26, 2023

Update contributing.md to require git -signoff

This repo will reject commits that do not have the git -signoff information in them, via the DCO github action. This PR updated contributing.md to let contributors know they must include a signoff.

License Assignment

This repository is copyright 2017-2023 Joseph Block under a Attribution-NonCommercial-ShareAlike 4.0 International license.

Types of changes

  • New entry
  • Typo cleanup
  • Text updates

Checklist:

  • All new and existing tests pass.
  • List entries are sorted alphabetically.
  • Any list entries are one line. This makes it easier to keep the sections sorted. Let the markdown renderer handle line breaks, don't try to help it.
  • I confirmed that all the links in my PR are valid.

Signed-off-by: AriESQ <19827230+AriESQ@users.noreply.github.com>
@AriESQ AriESQ marked this pull request as ready for review October 26, 2023 00:15
@AriESQ
Copy link
Contributor Author

AriESQ commented Oct 26, 2023

If someone doesn't know to do a git -signoff commit; the DCO github action will give them the following error; which requires that they use a local git environment to rebase the branch. This is kind of sub-optimal, given that folks may want to just do a drive-by edit with the Github GUI editor. A benefit of using the Github GUI editor is that it verifies the committer, and populates the anti-spam email relay automatically.

I might reconsider whether you want to require this. The PR template has a sign-off/assignment, which should be sufficient. If a friendly committer messes up the --signoff they may abandon the PR instead of going through the trouble of a whole rebase and resubmit.

DCO / DCO required action Oct 25, 2023 in 1s
DCO

There is one commit incorrectly signed off. This means that the author of this commit failed to include a Signed-off-by line in the commit message.

To avoid having PRs blocked in the future, always include Signed-off-by: Author Name authoremail@example.com in every commit message. You can also do this automatically by using the -s flag (i.e., git commit -s).

Here is how to fix the problem so that this code can be merged.
Rebase the branch

If you have a local git environment and meet the criteria below, one option is to rebase the branch and add your Signed-off-by lines in the new commits. Please note that if others have already begun work based upon the commits in this branch, this solution will rewrite history and may cause serious issues for collaborators (described in the git documentation under "The Perils of Rebasing").

You should only do this if:

You are the only author of the commits in this branch
You are absolutely certain nobody else is doing any work based upon this branch
There are no empty commits in the branch (for example, a DCO Remediation Commit which was added using --allow-empty)

To add your Signed-off-by line to every commit in this branch:

Ensure you have a local copy of your branch by [checking out the pull request locally via command line](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/checking-out-pull-requests-locally).
In your local branch, run: git rebase HEAD~1 --signoff
Force push your changes to overwrite the branch: git push --force-with-lease origin yubikey2

Summary

Commit sha: 2df77e9, Author: AriESQ, Committer: GitHub; The sign-off is missing.

Copy link
Owner

@unixorn unixorn left a comment

Choose a reason for hiding this comment

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

lgtm

@unixorn unixorn merged commit e76bf38 into unixorn:main Oct 26, 2023
2 checks passed
@unixorn
Copy link
Owner

unixorn commented Oct 26, 2023

Thanks!

@AriESQ AriESQ deleted the contributing branch October 26, 2023 01:27
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.

2 participants