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

repo-avatars - Fix wrong organization avatar #7324

Merged
merged 2 commits into from
Apr 7, 2024

Conversation

LitoMore
Copy link
Contributor

@LitoMore LitoMore commented Apr 1, 2024

Closes #7322

I've added a new optional parameter ignoreBots, for the repo-avatars scene.

Test URLs

@LitoMore LitoMore force-pushed the repo-avatars/wrong-org-icon branch from e4c94a0 to 8bbf468 Compare April 1, 2024 05:59
@fregante
Copy link
Member

fregante commented Apr 6, 2024

Thank you for the PR! Sorry for the delay, I wanted to think about this for a bit.

I think that rather than a flag like this, it should just change the way it selects existing avatars in every case.

There could be a @LitoMore user and a "LitoMore" app. The alt text provided by GitHub is actually incorrect, you cannot @-mention apps, you can only @-mention actual user/orgs (sometimes this overlaps, sometimes this doesn't)

So instead of querying img[alt="@simple-icon"] it should query [href="/simple-icon" i] img. I think that's what we had at some point, so we should git blame the line and see why it was changed.

@fregante fregante added the bug label Apr 6, 2024
@LitoMore
Copy link
Contributor Author

LitoMore commented Apr 7, 2024

We should git blame the line and see why it was changed.

Should be this: #2142

@fregante
Copy link
Member

fregante commented Apr 7, 2024

Indeed! So that selector is new specifically to add support for bots, the /user was just a raw request URL.

My suggested selector should work

Copy link
Member

@fregante fregante left a comment

Choose a reason for hiding this comment

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

Thank you! Have you tested this change? Does it fix the issue for you?

@LitoMore
Copy link
Contributor Author

LitoMore commented Apr 7, 2024

@fregante I've tested it on my side. It's working correctly.

@fregante fregante merged commit f8ea50b into refined-github:main Apr 7, 2024
9 checks passed
@LitoMore LitoMore deleted the repo-avatars/wrong-org-icon branch April 7, 2024 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

repo-avatars - Wrong organization icon
2 participants