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

How to exclude template when decode yaml with anchor #250

Open
Whirlwind opened this issue May 6, 2020 · 0 comments
Open

How to exclude template when decode yaml with anchor #250

Whirlwind opened this issue May 6, 2020 · 0 comments

Comments

@Whirlwind
Copy link

Whirlwind commented May 6, 2020

.ci_job_template: &ci_job_template
  only:
    - triggers
    - web

patch:
  <<: *ci_job_template
  stage: precheck_build

after YAMS.load, I get

{
  ".ci_job_template": {
    "only": ["triggers", "web"]
  },
  "patch": {
    "only": ["triggers", "web"],
    "stage": "precheck_build"
  }
}

I want to exclude the .ci_job_template. But I can not check the node whether it is a anchor.

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

No branches or pull requests

1 participant