• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

goto / guardian / 18910799942
66%

Build:
DEFAULT BRANCH: main
Ran 29 Oct 2025 02:13PM UTC
Jobs 1
Files 112
Run time 4min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

29 Oct 2025 02:10PM UTC coverage: 67.75% (-0.2%) from 67.964%
18910799942

push

github

web-flow
feat: refactor smart inactive grant filtering logic (#236)

* feat: refactor smart inactive grant filtering logic

Moved the logic for filtering out smart inactive grants from the Postgres repository layer to the service layer. Introduced NotIDs to ListGrantsFilter and updated the service to compute excluded grant IDs based on active/inactive status, ensuring only the latest inactive grant per resource is included when no active counterpart exists. Removed the corresponding SQL logic from the repository.

* Update grant_repository.go

* Exclude specific user grant IDs in total grants count

Updated GetGrantsTotalCount to generate and exclude user grant IDs for smart inactive grants. This ensures the total count reflects the intended filtered set by modifying the NotIDs filter before querying the repository.

* Refactor grant exclusion logic for smart inactive grants

Moved the logic for generating excluded user grant IDs for smart inactive grants from the core grant service methods to the API handler layer. Introduced the GenerateUserExcludedGrantIDsForSmartInactiveGrants method in the grant service interface and updated mocks accordingly. This change centralizes the exclusion logic and simplifies the core service methods.

* Refactor grant joins and sort unique summaries

Changed grant repository to remove unnecessary Preload calls and updated join types for resources and appeals. Also added sorting to the unique summaries generation to ensure consistent ordering of values.

* Refactor grant joins to use GORM associations

Updated the applyGrantsJoins function to use GORM association names ('Resource' and 'Appeal') instead of raw SQL JOIN statements for improved readability and maintainability.

* Refactor grant joins and preload logic in repository

Updated the List method to preload the Appeal relation instead of using a join. Separated join logic for listing and summary generation by introducing applyGrantsSummaryJoins, which joins both Resource a... (continued)

6 of 79 new or added lines in 5 files covered. (7.59%)

11489 of 16958 relevant lines covered (67.75%)

4.56 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
61.05
2.6% internal/store/postgres/grant_repository.go
3
22.11
-0.24% internal/store/postgres/utils.go
7
53.33
-1.34% api/handler/v1beta1/grant.go
61
69.33
-7.18% core/grant/service.go
Jobs
ID Job ID Ran Files Coverage
1 18910799942.1 29 Oct 2025 02:13PM UTC 112
67.75
GitHub Action Run
Source Files on build 18910799942
  • Tree
  • List 112
  • Changed 6
  • Source Changed 0
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • eb824a45 on github
  • Prev Build on main (#18875764968)
  • Next Build on main (#19070609885)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc