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

checks: add check tab #3004

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

carlinmack
Copy link
Contributor

@carlinmack carlinmack commented Mar 21, 2025

❤️ Thank you for your contribution!

Description

Please describe briefly your pull request.

Checklist

Ticks in all boxes and 🟢 on all GitHub actions status checks are required to merge:

Frontend

Reminder

By using GitHub, you have already agreed to the GitHub’s Terms of Service including that:

  1. You license your contribution under the same terms as the current repository’s license.
  2. You agree that you have the right to license your contribution under the current repository’s license.

@carlinmack carlinmack changed the title checks: add check tab wip:get checks checks: add check tab Mar 21, 2025
@@ -179,9 +217,12 @@ def user_dashboard_request_view(request, **kwargs):

if has_record_topic:
topic = _resolve_topic_record(request)
record_ui = topic["record_ui"] # None when draft
record = topic["record"] # None when draft
Copy link
Member

Choose a reason for hiding this comment

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

The 4 # None when draft comments were not true, so they are removed.

Copy link
Contributor

@kpsherva kpsherva Mar 25, 2025

Choose a reason for hiding this comment

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

are the checks also added to community view? this addition will display only user dashboard ones if I am not mistaken
I saw it later below

Comment on lines +182 to +183
# TODO communities can have mulitiple configs which we should collate
# TODO check for parent community too
Copy link
Member

Choose a reason for hiding this comment

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

These 2 TODOs will be implemented before going to production.

@ptamarit ptamarit marked this pull request as ready for review March 24, 2025 17:21
return None

checks = (
CheckRun.query.filter(
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this part should be moved to a service, since it does not follow our usual layered architecture
In addition, if I understand this correctly you are adding db request for every request - in case of community invitation and other requests types

is_draft = record_ui["is_draft"] if record_ui else False
community_id = request["receiver"]["community"]
Copy link
Contributor

Choose a reason for hiding this comment

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

will all requests will record topic have community as a receiver? In this line you expect it, but I think it might break for some requests, or some other ones added in the future that receiver won't be a community

Copy link
Member

Choose a reason for hiding this comment

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

If I remember correctly, guest access request to a record has the user as receiver

Copy link
Member

@ptamarit ptamarit Mar 25, 2025

Choose a reason for hiding this comment

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

Higher up in the same file we do:

    request_type = request["type"]
    is_record_inclusion = request_type == CommunityInclusion.type_id

    try:
        if is_record_inclusion:
            community = request["receiver"]["community"]

I will do the same: check the type of the request before getting the community.

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.

checks: community curator can't easily see in a request if there are failing checks
4 participants