Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/check-pr-issue.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
- name: Check PR linked issue and assignee
uses: arkid15r/check-pr-issue-action@a3635191c798f111aae577759b579dc37bb13e02
with:
close_pr_on_failure: 'false'
close_pr_on_failure: 'true'
github_token: ${{ secrets.GITHUB_TOKEN }}
no_assignee_message: 'Test: The linked issue must be assigned to the PR author.'
no_issue_message: 'Test: This PR must be linked to an issue.'
no_assignee_message: 'The linked issue must be assigned to the PR author.'
no_issue_message: 'The PR must be linked to an issue assigned to the PR author.'
require_assignee: 'true'
skip_users: 'arkid15r,kasya'
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,12 @@ class ProjectHealthMetricsOrder:
"""Ordering for Project Health Metrics."""

score: strawberry.auto
stars_count: strawberry.auto
forks_count: strawberry.auto
contributors_count: strawberry.auto
created_at: strawberry.auto

# We need to order by another field in case of equal scores
# We need to order by another field in case of equal values
# to ensure unique metrics in pagination.
# The ORM returns random ordered query set if no order is specified.
# We don't do ordering in the model since we order already in the query.
Expand Down
8 changes: 4 additions & 4 deletions backend/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,29 @@ def test_order_fields(self):
order_fields = {
field.name for field in ProjectHealthMetricsOrder.__strawberry_definition__.fields
}
expected_fields = {"score", "project__name"}
expected_fields = {
"score",
"stars_count",
"forks_count",
"contributors_count",
"created_at",
"project__name",
}
assert expected_fields == order_fields

def test_order_by(self):
"""Test ordering by score."""
order_instance = ProjectHealthMetricsOrder(score="DESC", project__name="ASC")
"""Test ordering by various fields."""
order_instance = ProjectHealthMetricsOrder(
score="DESC",
stars_count="DESC",
forks_count="ASC",
contributors_count="DESC",
created_at="ASC",
project__name="ASC",
)
assert order_instance.score == "DESC"
assert order_instance.stars_count == "DESC"
assert order_instance.forks_count == "ASC"
assert order_instance.contributors_count == "DESC"
assert order_instance.created_at == "ASC"
assert order_instance.project__name == "ASC"
8 changes: 4 additions & 4 deletions cspell/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"devDependencies": {
"@cspell/dict-aws": "^4.0.15",
"@cspell/dict-data-science": "^2.0.10",
"@cspell/dict-en_us": "^4.4.21",
"@cspell/dict-data-science": "^2.0.11",
"@cspell/dict-en_us": "^4.4.22",
"@cspell/dict-fullstack": "^3.2.7",
"@cspell/dict-golang": "^6.0.23",
"@cspell/dict-golang": "^6.0.24",
"@cspell/dict-k8s": "^1.0.12",
"@cspell/dict-people-names": "^1.1.14",
"@cspell/dict-people-names": "^1.1.15",
"@cspell/dict-software-terms": "^4.2.5",
"@cspell/dict-win32": "^2.0.9",
"cspell": "^8.19.4"
Expand Down
106 changes: 53 additions & 53 deletions cspell/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading