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

Add ability to sync multiple collections and fix bugs #57

Merged
merged 12 commits into from
Apr 11, 2024

Conversation

parkerbxyz
Copy link
Owner

@parkerbxyz parkerbxyz commented Apr 5, 2024

This pull request includes changes in the README.md, action.yml, github_publisher.py, and Pipfile files. The primary changes are related to the ability to sync multiple Guru collections simultaneously, changes in the naming convention of inputs, and modifications to the github_publisher.py script for better error handling and improved code efficiency.

Improvements to file path handling:

  • github_publisher.py: Several methods have been updated to use the quote function from urllib.parse when creating URLs for GitHub API requests, which ensures special characters in file paths are correctly encoded. The rstrip method calls on collection and folder names have been replaced with strip to remove leading and trailing whitespace. [1] [2] [3] [4] [5] [6]

Updates to handling multiple Guru collections:

  • README.md: The documentation has been updated to reflect changes in how multiple Guru collections are handled. Instead of using a matrix strategy, a comma-separated list of Collection IDs is now provided to the guru-collection-ids input. [1] [2]
  • github_publisher.py: The script now supports multiple Guru collections by accepting a comma-separated list of Collection IDs from the GURU_COLLECTION_IDS environment variable.

Deprecation of input parameters:

  • action.yml: The guru_collection_id and collection_directory_path input parameters have been deprecated and replaced with guru-collection-ids and collection-directory-path, respectively. The runs section has been updated to support both the new and deprecated parameters. [1] [2]

Other changes:

  • Pipfile: The reference for the guru package has been updated.
  • README.md: The note has been changed to a tip.
  • github_publisher.py: Several other minor changes have been made, including better error handling when a SHA is not found in the repository, and better handling of images without an extension or filename in convert_card_content. [1] [2] [3]

@parkerbxyz parkerbxyz self-assigned this Apr 5, 2024
Copy link

github-actions bot commented Apr 5, 2024

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ COPYPASTE jscpd yes no 1.87s
✅ MARKDOWN markdownlint 1 0 0.33s
✅ MARKDOWN markdown-link-check 1 0 0.91s
✅ MARKDOWN markdown-table-formatter 1 0 0.3s
✅ PYTHON bandit 1 0 1.22s
✅ PYTHON black 1 0 1.09s
✅ PYTHON mypy 1 0 8.04s
✅ PYTHON ruff 1 0 0.06s
✅ REPOSITORY checkov yes no 11.53s
✅ REPOSITORY gitleaks yes no 0.29s
✅ REPOSITORY git_diff yes no 0.0s
✅ REPOSITORY grype yes no 11.59s
✅ REPOSITORY secretlint yes no 0.99s
✅ REPOSITORY trivy yes no 4.04s
✅ REPOSITORY trivy-sbom yes no 2.45s
✅ REPOSITORY trufflehog yes no 8.02s
✅ SPELL cspell 5 0 3.67s
✅ SPELL lychee 2 0 0.24s
✅ YAML prettier 1 0 0.65s
✅ YAML v8r 1 0 2.48s
✅ YAML yamllint 1 0 0.24s

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

@parkerbxyz parkerbxyz changed the title Improve error handling and update Guru SDK Improve error handling and update dependencies Apr 5, 2024
@parkerbxyz parkerbxyz force-pushed the fix-self-healing branch 3 times, most recently from e3c719a to 4147545 Compare April 5, 2024 18:31
@parkerbxyz parkerbxyz merged commit defba1a into main Apr 11, 2024
3 checks passed
@parkerbxyz parkerbxyz deleted the fix-self-healing branch April 11, 2024 00:27
@parkerbxyz parkerbxyz changed the title Improve error handling and update dependencies feat: add ability to sync multiple collections Apr 11, 2024
parkerbxyz added a commit that referenced this pull request Apr 11, 2024
* refactor: use `or` operator to simplify code

* fix: do not attempt to delete nonexistent file

* fix: set external_id to None if not found in metadata

* fix(deps): update dependencies

* fix: handle special characters in folder names

* feat: add support for syncing multiple collections

* fix: skip images with invalid extension

* docs(README): update inputs and example workflows

* fix: quote file path in API request URLs
parkerbxyz added a commit that referenced this pull request Apr 11, 2024
refactor: use `or` operator to simplify code

fix: do not attempt to delete nonexistent file

fix: set external_id to None if not found in metadata

fix(deps): update dependencies

fix: handle special characters in folder names

feat: add support for syncing multiple collections

fix: skip images with invalid extension

docs(README): update inputs and example workflows

fix: quote file path in API request URLs
@parkerbxyz parkerbxyz changed the title feat: add ability to sync multiple collections Add ability to sync multiple collections Apr 11, 2024
parkerbxyz added a commit that referenced this pull request Apr 11, 2024
refactor: use `or` operator to simplify code
  Source-Link: ba77df7

fix: do not attempt to delete nonexistent file
  Source-Link: fe5df41

fix: set external_id to None if not found in metadata
  Source-Link: 42e1c3c

fix(deps): update dependencies
  Source-Link: 80da4b3

fix: handle special characters in folder names
  Source-Link: 44056a3

feat: add support for syncing multiple collections
  Source-Link: fecabfe

fix: skip images with invalid extension
  Source-Link: 9b5c288

docs(README): update inputs and example workflows
  Source-Link: 0ba2633

fix: quote file path in API request URLs
  Source-Link: a04ec73
parkerbxyz added a commit that referenced this pull request Apr 11, 2024
refactor: use `or` operator to simplify code

fix: do not attempt to delete nonexistent file

fix: set external_id to None if not found in metadata

fix(deps): update dependencies

fix: handle special characters in folder names

feat: add support for syncing multiple collections

fix: skip images with invalid extension

docs(README): update inputs and example workflows

fix: quote file path in API request URLs
@parkerbxyz parkerbxyz changed the title Add ability to sync multiple collections Add ability to sync multiple collections and fix bugs Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant