-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewrite unknown emails to account for emails on commits
Closes #163. See also: - plone/documentation#1722 - plone/documentation#1716
- Loading branch information
1 parent
b480cd0
commit 5de5fb4
Showing
1 changed file
with
17 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -218,6 +218,7 @@ def __init__(self, event): | |
self.cla_url = "https://plone.org/foundation/contributors-agreement" # noqa | ||
self.cla_email = "[email protected]" | ||
self.github_help_setup_email_url = "https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/adding-an-email-address-to-your-github-account" # noqa | ||
self.github_help_commit_email = "https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-email-preferences/setting-your-commit-email-address" | ||
self.status_context = "Plone Contributors Agreement verifier" | ||
|
||
super().__init__(event) | ||
|
@@ -269,18 +270,26 @@ def run(self): | |
users = ", ".join(set(unknown)) | ||
self.log(f"{users} missing contributors agreement") | ||
msg = ( | ||
f"{users} your emails are not known to GitHub and thus it " | ||
f"is impossible to know if you have signed the Plone " | ||
f"Contributor Agreement, which is required to merge this " | ||
f"pull request.\n\n" | ||
f"{users} the email address in your commit does not match an " | ||
"email in your GitHub account. Thus it is impossible to " | ||
"determine whether you have signed the Plone Contributor " | ||
"Agreement, which is required to merge this pull request." | ||
"\n\n" | ||
f"Learn about the Plone Contributor Agreement: {self.cla_url} " | ||
f"How to add more emails to your GitHub account: " | ||
f"{self.github_help_setup_email_url} " | ||
"\n\n" | ||
"If you have sent in your Plone Contributor Agreement, " | ||
"and received and accepted an invitation to join the " | ||
"Plone GitHub organization, then you might need to add " | ||
"the email address on your Agreement to your GitHub account." | ||
"Plone GitHub organization, then you might need to either add " | ||
"the email address on your Agreement to your GitHub account " | ||
"or change the email address in your commits. If you need to " | ||
"do the latter, then you should squash the commits with your " | ||
"matching email and push them." | ||
"\n\n" | ||
"Add more emails to your GitHub account:\n" | ||
f"{self.github_help_setup_email_url}" | ||
"\n\n" | ||
"Change the email address in your commits:\n" | ||
f"{self.github_help_commit_email}" | ||
) | ||
self.g_issue.create_comment(body=msg) | ||
|
||
|