Skip to content

Commit bb1817b

Browse files
Addressed bot feedback
Signed-off-by: Lukasz Gryglicki <[email protected]>
1 parent 63e1d90 commit bb1817b

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

CO_AUTHORS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Example:
3636
This enables co-authors support on all repos under "linuxfoundation", except for those matching the regular expression `re:(?i)^repo[0-9]+$`.
3737

3838
Algorithm to match pattern is as follows:
39-
- First we check repository name for exact match. Repository name is without the organization name, so for `https://github.com/linuxfoundation/easycla` it is just `easycla`. If we find an entry in `skip_cla` for `easycla` that entry is used and we stop searching.
39+
- First we check repository name for exact match. Repository name is without the organization name, so for `https://github.com/linuxfoundation/easycla` it is just `easycla`. If we find an entry in `enable_co_authors` for `easycla` that entry is used and we stop searching.
4040
- If no exact match is found, we check for regular expression match. Only keys starting with `re:` are considered. If we find a match, we use that entry and stop searching.
4141
- If no match is found, we check for `*` entry. If it exists, we use that entry and stop searching.
4242
- If no match is found, we don't support co-authors for that repository. Default is no co-author support.
@@ -159,4 +159,4 @@ If it does, the backend will process the co-authors as follows, assume trailer v
159159

160160
- Finally we use the name part for `name <email>` and lookup using GitHub API assuming that this name is GitHub username/login (this is the case for some bots). If the user is found, we use that user as co-author.
161161

162-
We use internal caching while doing all those lookups with cache key `name` and `email` and TTL 24 hours. We even cache by `(name, email)` when nothing is found becaus ethis is the most time consuming option. It will have a channce yo be found in the future (up to 24 hours from lookup).
162+
We use internal caching while doing all those lookups with cache key `name` and `email` and TTL 24 hours. We even cache by `(name, email)` when nothing is found because this is the most time consuming option. It will have a chance to be found in the future (up to 24 hours from lookup).

cla-backend-go/github/github_repository.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,8 @@ func (u UserCommitSummary) getUserInfo(tagUser bool) string {
224224
if tagUser {
225225
tagValue = "@"
226226
}
227-
if u.CommitAuthor != nil && u.CommitAuthor.Login != nil {
228-
if *u.CommitAuthor.Login != "" {
227+
if u.CommitAuthor != nil {
228+
if u.CommitAuthor.Login != nil && *u.CommitAuthor.Login != "" {
229229
sb.WriteString(fmt.Sprintf("login: %s%s / ", tagValue, *u.CommitAuthor.Login))
230230
}
231231

cla-backend/cla/models/dynamo_models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3913,7 +3913,7 @@ class Meta:
39133913
enabled = BooleanAttribute(null=True)
39143914
note = UnicodeAttribute(null=True)
39153915
skip_cla = MapAttribute(of=UnicodeAttribute, null=True)
3916-
enable_co_authors = MapAttribute(of=UnicodeAttribute, null=True)
3916+
enable_co_authors = MapAttribute(of=BooleanAttribute, null=True)
39173917

39183918

39193919
class GitHubOrg(model_interfaces.GitHubOrg): # pylint: disable=too-many-public-methods

0 commit comments

Comments
 (0)