Skip to content

mailman: check for cover letter#142

Merged
charliemirabile merged 1 commit into
masterfrom
cover-letter-check-v3
Jul 29, 2024
Merged

mailman: check for cover letter#142
charliemirabile merged 1 commit into
masterfrom
cover-letter-check-v3

Conversation

@michael-burke4

Copy link
Copy Markdown
Contributor

Fixes #134

I chose to include the cover letter at the beginning of the git log as including it at the end would involve two different scenarios where we'd have to check for a missing cover letter: if the patches fail for some reason or if the patches all apply successfully. The patches could fail if what we call cover_letter isn't actually a cover letter, so we can avoid that scenario altogether by checking at the beginning.

Comment thread mailman/submit.py Outdated
Comment thread mailman/submit.py Outdated

@charliemirabile charliemirabile 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.

Minor style tweaks to make the code match the rest of the file, but I tested it and it works

@michael-burke4 michael-burke4 force-pushed the cover-letter-check-v3 branch from 849df51 to 810ad9d Compare July 29, 2024 19:25
The first patch recieved should be a cover letter. We can check this
by trying to apply it once without the --empty=keep option, and
trying to apply it again with the --empty=keep option.
We know the patch is empty if the first apply (WITHOUT empty=keep)
fails, but the second apply (WITH empty=keep) works.

If the first check fails we know that what should be the cover letter
isn't empty and actually makes changes. If the second check fails,
that means this is probably a patch that is meant to have changes, but
this patch is messed up in some way.
@michael-burke4 michael-burke4 force-pushed the cover-letter-check-v3 branch from 810ad9d to d2e6762 Compare July 29, 2024 19:42

@charliemirabile charliemirabile 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.

lgtm

@charliemirabile charliemirabile merged commit 93dfed3 into master Jul 29, 2024
@charliemirabile charliemirabile deleted the cover-letter-check-v3 branch July 29, 2024 19:46
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.

Include cover letters in grading git repo

2 participants