Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ When contributing to this project, please ensure that your changes are [well-doc

## Reporting Issues 🐛

If you encounter any issues with github-folder-tree, please open an issue on the GitHub repository. Provide detailed information about the problem, including steps to reproduce it, error messages (if applicable), and any other relevant information.
If you encounter any issues with github-folder-tree, please open an issue on the [GitHub Repository](https://github.com/sauravhathi/github-folder-tree/issues/new/choose). Provide detailed information about the problem, including steps to reproduce it, error messages (if applicable), and any other relevant information.

## Acknowledgments 🙏

Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "github-folder-tree",
"version": "1.0.0",
"version": "1.0.2",
"description": "github-folder-tree is a React custom hook that allows you to fetch and process the contents of a GitHub folder. It retrieves information about the files and subfolders in the specified folder, including their names, file types, download URLs, SHA hashes, sizes, and paths.",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
Expand All @@ -14,7 +14,7 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/your-username/your-repository.git"
"url": "git+https://github.com/sauravhathi/github-folder-tree.git"
},
"keywords": [
"github",
Expand All @@ -32,9 +32,9 @@
"author": "Saurav Hathi",
"license": "MIT",
"bugs": {
"url": "https://github.com/sauravhathi/github-repository-downloader/issues"
"url": "https://github.com/sauravhathi/github-folder-tree/issues/new/choose"
},
"homepage": "https://github.com/sauravhathi/github-repository-downloader#readme",
"homepage": "https://github.com/sauravhathi/github-folder-tree#readme",
"devDependencies": {
"@types/node": "^20.1.4",
"@types/react": "^18.2.6",
Expand Down
3 changes: 1 addition & 2 deletions src/hooks/useGitHubFolderTree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export const useGitHubFolderTree = (folderUrl: string, apiKey?: string) => {
const repo = matches[2]
const branch = matches[3]
const dir = matches[4]
console.log(user, repo, branch, dir)

setLog(`Extracted user: ${user}, repo: ${repo}, branch: ${branch}, dir: ${dir}`)

const apiUrl = `https://api.github.com/repos/${user}/${repo}/contents/${dir}?ref=${branch}`
Expand All @@ -106,7 +106,6 @@ export const useGitHubFolderTree = (folderUrl: string, apiKey?: string) => {
setRepoFiles(prevFiles => [...prevFiles, ...processedFiles].filter(Boolean) as RepoFile[])
} catch (error: any) {
setError(error.response?.data?.message || 'An error occurred')
console.error(`Error: ${error}`)
}
}

Expand Down