Skip to content

Conversation

@paduszyk
Copy link
Owner

@paduszyk paduszyk commented Nov 2, 2023

Description

This updates the gitmojis.core.fetch_guide function so that it returns the Guide object created from a local copy of the Gitmoji API data in case of any issues with the API request.

The backup data are stored in a local static JSON file added in this PR as well.

Parsing/decoding of that JSON file is handled by json built-in library.

@paduszyk paduszyk added the feature New feature or request label Nov 2, 2023
@paduszyk paduszyk self-assigned this Nov 2, 2023
@codecov
Copy link

codecov bot commented Nov 2, 2023

Codecov Report

Merging #10 (ec6ba1a) into main (5133fab) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main       #10   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            5         5           
  Lines           41        49    +8     
  Branches         3         4    +1     
=========================================
+ Hits            41        49    +8     
Files Coverage Δ
src/gitmojis/core.py 100.00% <100.00%> (ø)
src/gitmojis/defaults.py 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@paduszyk paduszyk merged commit fb9155a into main Nov 2, 2023
@paduszyk paduszyk deleted the feature/no-ref/fall-back-to-backup-data-if-api-request-fails branch November 2, 2023 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants