Repository navigation
fix(commitrequest): name the author from the creating write, and settle no-commit applies #459
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -241,6 +241,22 @@ func (s *scopeFacts) lookupLatest(uid string, cutoff time.Time) (AuthorFact, boo | |
| return liveFact(s.latest[uid], cutoff) | ||
| } | ||
|
|
||
| // lookupCreation reads the fact that created the object with uid, from the exact tier, where every | ||
| // fact carrying a uid and a resourceVersion is filed under its own version, so no later write | ||
| // replaces it. It walks the tier, which costs one pass over a type's facts: it serves only the | ||
| // CommitRequest author lookup, made once per request. | ||
| func (s *scopeFacts) lookupCreation(uid string, cutoff time.Time) (AuthorFact, bool) { | ||
|
Comment on lines
+244
to
+248
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| if uid == "" { | ||
| return AuthorFact{}, false | ||
| } | ||
| for key, entry := range s.exact { | ||
| if key.uid == uid && entry.fact.Created { | ||
| return liveFact(entry, cutoff) | ||
| } | ||
| } | ||
| return AuthorFact{}, false | ||
| } | ||
|
|
||
| // lookupRemovalPointer reads the sticky removal pointer. It takes NO cutoff, and it is the only lookup here | ||
| // that does not: the pointer's horizon is a count rather than a clock. | ||
| // | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use American English and active voice.
Change this sentence to “The claim stores the author; subsequent reads use that value.” The current sentence uses “afterwards” and “is written.” As per coding guidelines, use “American English everywhere” and “State what the software does, in present tense, active voice.”
LanguageTool
[locale-violation] ~169-~169: In American English, ‘afterward’ is the preferred variant. ‘Afterwards’ is more commonly used in British English and other dialects.
Context: ...itten in the claim, and read from there afterwards.
(AFTERWARDS_US)
Sources: Coding guidelines, Linters/SAST tools