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

rm-hull / fuel-prices-api / 22688039815
46%

Build:
DEFAULT BRANCH: main
Ran 04 Mar 2026 08:33PM UTC
Jobs 1
Files 17
Run time 1min
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

04 Mar 2026 08:33PM UTC coverage: 18.658% (-0.1%) from 18.796%
22688039815

push

github

web-flow
feat: add support for incremental data fetching (#22)

* feat: add support for incremental data fetching

Introduces a `--full-refresh` CLI flag and logic to fetch only data
updated since the last successful request using the
`effective-start-timestamp` query parameter.

*   Adds `fullRefresh` toggle to `fuelPricesManager`.
*   Updates `ApiServer` and `bootstrap` to propagate the new setting.
*   Forces full refresh for the `import` command.
*   Conditionally includes `effective-start-timestamp` in API calls.

```mermaid
sequenceDiagram
    participant CLI as CLI (main.go)
    participant Cmd as API/Import Command
    participant Client as FuelPricesClient
    participant Gov as GOV.UK API

    CLI->>Cmd: Execute with fullRefresh flag
    Cmd->>Client: NewFuelPricesClient(..., fullRefresh)
    Client->>Client: getEffectiveStartTimestamp()
    alt !fullRefresh AND lastFetch exists
        Client->>Gov: GET /path?effective-start-timestamp=...
    else
        Client->>Gov: GET /path
    end
```

* Update internal/client_fetch.go

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* refactor: use neturl.Values for query parameters

Replace manual string concatenation and manual escaping with the
standard library `neturl.Values` for constructing batch fetch URLs.

This change ensures all query parameters are consistently and safely
encoded, improving the robustness of the request logic.

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

0 of 25 new or added lines in 5 files covered. (0.0%)

203 of 1088 relevant lines covered (18.66%)

0.2 hits per line

Uncovered Changes

Lines Coverage ∆ File
17
0.0
0.0% internal/client_fetch.go
3
0.0
0.0% main.go
2
0.0
0.0% cmd/api_server.go
2
0.0
0.0% cmd/bootstrap.go
1
0.0
0.0% cmd/import.go
Jobs
ID Job ID Ran Files Coverage
1 22688039815.1 04 Mar 2026 08:33PM UTC 17
18.66
GitHub Action Run
Source Files on build 22688039815
  • Tree
  • List 17
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • fabfe119 on github
  • Prev Build on main (#22685973199)
  • Next Build on main (#22692461419)
  • Delete
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

© 2026 Coveralls, Inc