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 a list of additional accepted verbs in git commit messages #5992

Closed
wants to merge 3 commits into from

Conversation

faern
Copy link
Member

@faern faern commented Mar 20, 2024

Follow up to #5975. We realized we also miss queue. Instead of adding one to two words at a time, it's probably more efficient to look at our history and see what verbs we actually do use. Turns out we used 184 unique verbs that I classify as OK imperative verbs that were not already in the list.

The list was long. So I might have made a mistake or two while going through it. Please read the list and suggest words to remove or add 🙏

I have also submitted a PR to start getting these upstreamed. If the upstreaming goes smooth we will hopefully not need to maintain this list ourselves. Having it upstream has the valuable benefit of easily checking more than one repo without needing to duplicate this wordlist. mristin/opinionated-commit-message#131

These were taken from our own git history with:

git log --format=%s | \
    awk '{print tolower($1)}' | \
    tr -cd '\n[:alnum:]._-' | \
    sort -u > first-words

And then filtered against the verbs the action already accepts:

for word in $(cat first-words); do
    if ! grep -x "  '$word'," mostFrequentEnglishVerbs.ts > /dev/null; then
        echo "$word";
    fi;
done

And then manually inspect the result, since there is lots of invalid words


This change is Reviewable

Copy link
Member

@dlon dlon left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 6 unresolved discussions (waiting on @faern)


ci/additional-verbs.txt line 116 at r1 (raw file):

react
reapply
re-arrange

I think it's just rearrange


ci/additional-verbs.txt line 120 at r1 (raw file):

reconnect
redact
re-generate

I think it's just regenerate


ci/additional-verbs.txt line 122 at r1 (raw file):

re-generate
regenerate
re-implement

I think it's just reimplement


ci/additional-verbs.txt line 126 at r1 (raw file):

reload
render
re-parent

I think it's just reparent


ci/additional-verbs.txt line 128 at r1 (raw file):

re-parent
reposition
re-render

I think it's just rerender


ci/additional-verbs.txt line 184 at r1 (raw file):

wipe
wire
workaround

This is a noun. The verb is "work around", right?

Copy link
Contributor

@rablador rablador left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 10 unresolved discussions (waiting on @dlon and @faern)


ci/additional-verbs.txt line 35 at r1 (raw file):

decouple
decrease
dedup

There are no other abbreviations than this and "init" below. Maybe we should go for full words only?


ci/additional-verbs.txt line 72 at r1 (raw file):

infer
inherit
init

There are no other abbreviations than this and "dedup" above. Maybe we should go for full words only?


ci/additional-verbs.txt line 81 at r1 (raw file):

loop
lower
memoize

"memoRize"


ci/additional-verbs.txt line 116 at r1 (raw file):

Previously, dlon (David Lönnhager) wrote…

I think it's just rearrange

+1


ci/additional-verbs.txt line 120 at r1 (raw file):

Previously, dlon (David Lönnhager) wrote…

I think it's just regenerate

+1


ci/additional-verbs.txt line 122 at r1 (raw file):

Previously, dlon (David Lönnhager) wrote…

I think it's just reimplement

+1


ci/additional-verbs.txt line 126 at r1 (raw file):

Previously, dlon (David Lönnhager) wrote…

I think it's just reparent

+1


ci/additional-verbs.txt line 128 at r1 (raw file):

Previously, dlon (David Lönnhager) wrote…

I think it's just rerender

+1


ci/additional-verbs.txt line 175 at r1 (raw file):

uncomment
unescape
un-ignore

"unignore"


ci/additional-verbs.txt line 184 at r1 (raw file):

Previously, dlon (David Lönnhager) wrote…

This is a noun. The verb is "work around", right?

+1

@faern faern force-pushed the add-additional-git-commit-verbs branch from 032f605 to cb6bb0c Compare March 20, 2024 14:56
Copy link
Member Author

@faern faern left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @dlon and @rablador)


ci/additional-verbs.txt line 72 at r1 (raw file):

Previously, rablador (Jon Petersson) wrote…

There are no other abbreviations than this and "dedup" above. Maybe we should go for full words only?

I don't have a very strong opinion. Abbreviations are fine for me. Dedup and init feels very computer related abbreviations. And I don't think we must have a complete list of all abbreviations just because we approve a few. But I'm also fine with removing them.


ci/additional-verbs.txt line 81 at r1 (raw file):

Previously, rablador (Jon Petersson) wrote…

"memoRize"

It's not a typo, but I guess it can be argued whether or not we think memoization in verb form is OK or not :P https://en.wikipedia.org/wiki/Memoization


ci/additional-verbs.txt line 175 at r1 (raw file):

Previously, rablador (Jon Petersson) wrote…

"unignore"

Done.


ci/additional-verbs.txt line 184 at r1 (raw file):

Previously, rablador (Jon Petersson) wrote…

+1

Oops, this is a mistake for sure.

@rablador rablador requested a review from dlon March 20, 2024 15:15
Copy link
Contributor

@rablador rablador left a comment

Choose a reason for hiding this comment

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

Reviewed all commit messages.
Reviewable status: 1 of 2 files reviewed, 3 unresolved discussions (waiting on @dlon and @faern)


ci/additional-verbs.txt line 72 at r1 (raw file):

Previously, faern (Linus Färnstrand) wrote…

I don't have a very strong opinion. Abbreviations are fine for me. Dedup and init feels very computer related abbreviations. And I don't think we must have a complete list of all abbreviations just because we approve a few. But I'm also fine with removing them.

Yeah, I'm fine with both. I should have marked it as a nit instead.


ci/additional-verbs.txt line 81 at r1 (raw file):

Previously, faern (Linus Färnstrand) wrote…

It's not a typo, but I guess it can be argued whether or not we think memoization in verb form is OK or not :P https://en.wikipedia.org/wiki/Memoization

Oh! Well, it's legal as such, so I guess it can go on the list.

Copy link
Member Author

@faern faern left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 of 2 files reviewed, 3 unresolved discussions (waiting on @dlon and @rablador)


ci/additional-verbs.txt line 72 at r1 (raw file):

Previously, rablador (Jon Petersson) wrote…

Yeah, I'm fine with both. I should have marked it as a nit instead.

Done.


ci/additional-verbs.txt line 81 at r1 (raw file):

Previously, rablador (Jon Petersson) wrote…

Oh! Well, it's legal as such, so I guess it can go on the list.

Done.

Copy link
Member Author

@faern faern left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 of 2 files reviewed, 3 unresolved discussions (waiting on @dlon and @rablador)


ci/additional-verbs.txt line 35 at r1 (raw file):

Previously, rablador (Jon Petersson) wrote…

There are no other abbreviations than this and "init" below. Maybe we should go for full words only?

Done.

Copy link
Member

@dlon dlon left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @rablador)

Copy link
Member Author

@faern faern left a comment

Choose a reason for hiding this comment

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

Thanks for reviewing! However, I will hold off on merging this. Since the maintainer of the action seems positive towards merging all of this into upstream. If they do, we can simply pivot this PR into upgrading the action to the version with all our words :) mristin/opinionated-commit-message#131

Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @rablador)

Copy link
Contributor

@rablador rablador left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r2.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

faern added 2 commits March 22, 2024 09:36
These were taken from our own git history with:
```
git log --format=%s | \
    awk '{print tolower($1)}' | \
    tr -cd '\n[:alnum:]._-' | \
    sort -u > first-words
```

And then filtered against the verbs the action already accepts:
```
for word in $(cat first-words);
do
    if ! grep -x "  '$word'," mostFrequentEnglishVerbs.ts > /dev/null;
    then
        echo "$word";
    fi;
done
```

And then manually gone through, since there is lots of invalid words
@faern faern force-pushed the add-additional-git-commit-verbs branch from cb6bb0c to 07de294 Compare March 22, 2024 08:36
@faern faern marked this pull request as draft March 22, 2024 08:42
Copy link
Contributor

@rablador rablador left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r3, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@faern
Copy link
Member Author

faern commented Apr 2, 2024

Superseded by #6034

@faern faern closed this Apr 2, 2024
@faern faern deleted the add-additional-git-commit-verbs branch April 2, 2024 12:01
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.

3 participants