Actions36
- File Actions
- Issue Actions
- Organization Actions
- Release Actions
- Repository Actions
- Review Actions
- User Actions
- Workflow Actions
File → List
AI-generatedOverview
This node operation lists the contents of a folder in a specified GitHub repository using GitHub App authentication. It is useful for scenarios where you need to retrieve and display the files and directories within a repository path, such as for file management, automation workflows, or integration with other systems that require repository content information.
Use Case Examples
- Listing all files in the 'docs/' folder of a repository to generate a documentation index.
- Retrieving the contents of a project folder to automate backup or synchronization tasks.
- Displaying repository folder contents in a custom dashboard or application.
Properties
| Name | Meaning |
|---|---|
| Repository Owner | The owner of the GitHub repository, which can be selected from a list, provided as a URL, or entered by name. |
| Repository Name | The name of the GitHub repository, selectable from a list, provided as a URL, or entered by name. |
| Path | The path of the folder within the repository to list the contents of. This should be the full folder path, e.g., 'docs/'. |
Output
JSON
json- Array of file and folder objects representing the contents of the specified repository path.
Dependencies
- GitHub App authentication credentials (app ID, installation ID, private key)
Troubleshooting
- Ensure the repository owner and repository name are correctly specified and accessible by the GitHub App installation.
- Verify that the GitHub App has the necessary permissions to read repository contents.
- Check that the folder path exists in the repository; an invalid path may result in errors or empty results.
- Common error: 'File Path is a folder, not a file.' occurs if the operation expects a file but the path is a folder; use the list operation for folders.
Links
- GitHub API - List repository contents - Official GitHub API documentation for listing contents of a repository path.