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

Do not count multiple reviews from the same user #2

Merged
merged 3 commits into from
Jun 5, 2024

Conversation

chrysn
Copy link
Member

@chrysn chrysn commented Jun 4, 2024

My two ACKs (long apart, second reaffirming) were counted as two in RIOT-OS/RIOT#18942 for where two ACKs would have been needed.

I've added the mock by how I read https://pygithub.readthedocs.io/en/stable/github_objects/PullRequestReview.html and https://docs.github.com/en/rest/pulls/reviews?apiVersion=2022-11-28, is there any good way to confirm that .login is really a field access?

@chrysn
Copy link
Member Author

chrysn commented Jun 5, 2024

For lack of rights to assign @miri64, pinging instead. Does this repo require extra privileges to kick off actions as well?

@miri64
Copy link
Member

miri64 commented Jun 5, 2024

is there any good way to confirm that .login is really a field access?

I just tested it in the console for RIOT-OS/RIOT#20647 (which has three reviews):

In [1]: import github

In [2]: repo = github.Github("ghp_xxxxxxxxxxxxxxxxxxxxx").get_rep
   ...: o("RIOT-OS/RIOT")

In [3]: pull = repo.get_pull(20647)

In [4]: for review in pull.get_reviews():
   ...:     print(review.user.login)
   ...: 
mguetschow
dylad
Teufelchen1

@miri64
Copy link
Member

miri64 commented Jun 5, 2024

repo = github.Github("ghp_xxxxxxxxxxxxxxxxxxxxx").get_rep
...: o("RIOT-OS/RIOT")

Wow Github is smart :D accidentally posted the token and immediately it was revoked.

Copy link
Member

@miri64 miri64 left a comment

Choose a reason for hiding this comment

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

Code looks good and tests are passing. ACK!

@miri64
Copy link
Member

miri64 commented Jun 5, 2024

Does this repo require extra privileges to kick off actions as well?

Could you try to rebase? :-/

@chrysn chrysn force-pushed the duplicate-reviewers branch from 99e21c1 to 05772a0 Compare June 5, 2024 07:50
@chrysn
Copy link
Member Author

chrysn commented Jun 5, 2024

Nothing to rebase; commit--amend'ed and force pushed for the desired effect, CI now running.

@codecov-commenter
Copy link

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@chrysn chrysn force-pushed the duplicate-reviewers branch from 05772a0 to 25156ad Compare June 5, 2024 07:53
@miri64
Copy link
Member

miri64 commented Jun 5, 2024

Just use black ;-)

@chrysn
Copy link
Member Author

chrysn commented Jun 5, 2024

Force pushed a single lint fix ("expected 1 blank line before a nested definition, found 0"), the others might be still showing but be on some ignore list (I didn't touch the overly long lines).

If they show up again, I'll do the needful in a separate cleanup commit.

@miri64
Copy link
Member

miri64 commented Jun 5, 2024

See #3 for the yield from issue.

@chrysn chrysn force-pushed the duplicate-reviewers branch from 5ca7f01 to 951f96a Compare June 5, 2024 08:03
check_labels.py Outdated Show resolved Hide resolved
check_labels.py Outdated Show resolved Hide resolved
@chrysn
Copy link
Member Author

chrysn commented Jun 5, 2024

Just use black ;-)

I did, and it was happy. Apparently, linters disagree with each other.

I'll fix this one manually, but urge you to stop making styling mandatory where the auto-indent tools don't fix things.

@miri64
Copy link
Member

miri64 commented Jun 5, 2024

I did, and it was happy. Apparently, linters disagree with each other.

Black does not honor line lengths for strings.

I'll fix this one manually, but urge you to stop making styling mandatory where the auto-indent tools don't fix things.

I provided suggestions

@miri64
Copy link
Member

miri64 commented Jun 5, 2024

Removed the requirement for the commits to be signed.

@miri64 miri64 merged commit 153cc61 into RIOT-OS:master Jun 5, 2024
6 checks passed
@chrysn chrysn deleted the duplicate-reviewers branch June 5, 2024 08:10
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