Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetch readme #208

Closed
wants to merge 2 commits into from
Closed

Fetch readme #208

wants to merge 2 commits into from

Conversation

seb-icp
Copy link

@seb-icp seb-icp commented Oct 20, 2023

For an upcoming workshop, I'd like to be able to fetch README files from the GitHub repository. This is currently only supported for some "Examples Projects" but not for "Import from GitHub". This PR supports fetching a README file at the root of the repository.

async function fetchCode() {
const files = await worker.fetchGithub({ repo, branch, dir });
let files = await worker.fetchGithub({ repo, branch, dir });
const readme = await (await fetch(readmeUrl)).text();
Copy link
Contributor

@rvanasa rvanasa Oct 20, 2023

Choose a reason for hiding this comment

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

This seems to have unexpected behavior when README.md doesn't exist at the root of the repository. I opened another PR (#209) which implements this feature using a slightly different approach to account for this situation.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks!

@chenyan-dfinity
Copy link
Contributor

Closed in favor of #209, and deployed

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

Successfully merging this pull request may close these issues.

3 participants