Skip to content
This repository has been archived by the owner on Dec 8, 2023. It is now read-only.

Fetch files with Github API #173

Merged

Conversation

josephgregoryii
Copy link
Contributor

@josephgregoryii josephgregoryii commented May 12, 2022

Summary

  • Preview page hit's a pull request via query parameter and fetches SHA
  • Once the SHA is retrieved, we use the SHA to walk through the file tree and grab all files in quickstart directory

aswanson-nr and others added 6 commits May 11, 2022 16:03
* add a custom hook for grabbing query parameters off the location
  object
* use hook in preview page to grab and log out the 'pr' and 'quickstart'
  query parameters
* Ability to grab both the quickstart filepath and SHA from one fetch
  request
Copy link
Contributor

@aswanson-nr aswanson-nr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @josephgregoryii! I had one big comment on the recursive function, please let me know if that does/doesn't make any sense. The rest are just around finishing up the AC and some small naming comments!

src/pages/preview.jsx Outdated Show resolved Hide resolved
src/pages/preview.jsx Outdated Show resolved Hide resolved
src/pages/preview.jsx Show resolved Hide resolved
src/pages/preview.jsx Outdated Show resolved Hide resolved
src/pages/preview.jsx Outdated Show resolved Hide resolved
Copy link
Contributor

@aswanson-nr aswanson-nr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Saw one spot we should test out with path prefixes enabled!

src/pages/preview.jsx Show resolved Hide resolved
Copy link
Contributor

@zstix zstix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had a couple of questions / comments. This is looking great tho!!

src/pages/preview.jsx Show resolved Hide resolved
src/utils/preview/fetchHelpers.js Outdated Show resolved Hide resolved
src/utils/preview/fetchHelpers.js Outdated Show resolved Hide resolved
src/utils/preview/fetchHelpers.js Outdated Show resolved Hide resolved
src/utils/preview/fetchHelpers.js Outdated Show resolved Hide resolved
src/utils/preview/fetchHelpers.js Outdated Show resolved Hide resolved
Copy link
Contributor

@aswanson-nr aswanson-nr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error handling looks good!

@josephgregoryii josephgregoryii merged commit 962b6a8 into feature/quickstart-previews May 16, 2022
@josephgregoryii josephgregoryii deleted the campfire/nr-1674-gh-api-files branch May 16, 2022 22:47
@nr-opensource-bot
Copy link
Contributor

🎉 This PR is included in version 1.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants