fjogeleit / yaml-update-action

Update YAML property with dynamic values
MIT License
143 stars 46 forks source link

YAMLException: unknown tag #245

Open ZsharE opened 3 years ago

ZsharE commented 3 years ago

Hi,

I get an error when i try to edit my yaml file. That line works fine, it's an extension for MkDocs.

Error: YAMLException: unknown tag !<tag:yaml.org,2002:python/name:pymdownx.emoji.to_svg> (17:5)

markdown_extensions:
    - markdown_fenced_code_tabs:
        template: "bootstrap4"
    - pymdownx.emoji:
        emoji_generator: !!python/name:pymdownx.emoji.to_svg   <---
    - attr_list
    - md_in_html
fjogeleit commented 3 years ago

Hey, thank you for reporting. I will have a look on your exception.

fjogeleit commented 3 years ago

Is it possible for you to set your value in quotes?

markdown_extensions:
    - markdown_fenced_code_tabs:
        template: "bootstrap4"
    - pymdownx.emoji:
        emoji_generator: '!!python/name:pymdownx.emoji.to_svg'
    - attr_list
    - md_in_html
ZsharE commented 3 years ago

Unfortunately not. If I add !!python/name:pymdownx.emoji.to_svg in quotes or double quotes, it will throw a lot of errors when I try to build the mkdocs static site.

fjogeleit commented 3 years ago

Hm okay, the underlying Library defines Tags with !! and tries to process your type. (https://github.com/nodeca/js-yaml#supported-yaml-types) I can add an custom tag to be able to parse your yaml but it will dump your Tag after processing into quotes. So currently I have no Solution to workaround your Problem. I will ask the maintainer of the lib and let you now if I can solve this issue completly.

kavithatiru commented 1 year ago

How to add reviewers to the PR created by fjogeleit/yaml-update-action@main

fjogeleit commented 1 year ago

https://github.com/fjogeleit/yaml-update-action/blob/main/action.yml#L91

It accepts a comma separated list of usernames

kavithatiru commented 1 year ago

can be PR be automerged from GitHub actions

fjogeleit commented 1 year ago

Sorry, don't know.