Skip to content

v0.2.6

Compare
Choose a tag to compare
@jeff-mccoy jeff-mccoy released this 25 Apr 12:34
· 1080 commits to main since this release
88fab5a

What's Changed

  • Refactor fetch wrapper w/HTTP codes + more resp data by @jeff-mccoy in #59
    interface TheChuckNorrisJoke {
       icon_url: string;
       id: string;
       url: string;
       value: string;
    }
    
    // Try/catch is not needed as a response object will always be returned
    const response = await fetch<TheChuckNorrisJoke>("https://api.chucknorris.io/jokes/random?category=dev");
    
    // Instead, check the `response.ok` field
    if (response.ok) {
       // Add the Chuck Norris joke to the configmap 
       change.Raw.data["chuck-says"] = response.data.value;
       return;
    }
    
    // You can also assert on different HTTP response codes
    if (response.status === fetchStatus.NOT_FOUND) {
       // Do something else
    }

Known Issues

  • Pepr currently binds the mutating webhook to everything and should instead only bind to what the module uses. #31
  • ClusterRoles are currently unrestricted and need to be limited to only what the module uses. #31

Full Changelog: v0.2.5...v0.2.6