[Bug] Import tool generates error data format.
Closed this issue · 0 comments
Peefy commented
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
main.yaml
name: Backport merged pull request
on:
pull_request_target:
types: [closed]
permissions:
contents: write # so it can comment
pull-requests: write # so it can create pull requests
jobs:
backport:
name: Backport pull request
runs-on: ubuntu-latest
# Don't run on closed unmerged pull requests
if: github.event.pull_request.merged
steps:
- uses: actions/checkout@v3
- name: Create backport pull requests
uses: korthout/backport-action@v1
Run with the import tool
2. What did you expect to see? (Required)
The right KCL code
"""
This file was generated by the KCL auto-gen tool. DO NOT EDIT.
Editing this file might prove futile when you re-run the KCL auto-gen generate command.
"""
name = "Backport merged pull request"
on = {
pull_request_target = {
types = [
"closed"
]
}
}
permissions = {
contents = "write"
"pull-requests" = "write"
}
jobs = {
backport = {
name = "Backport pull request"
"runs-on" = "ubuntu-latest"
$if = "github.event.pull_request.merged"
steps = [
{
uses = "actions/checkout@v3"
}
{
name = "Create backport pull requests"
uses = "korthout/backport-action@v1"
}
]
}
}
3. What did you see instead (Required)
The wrong KCL code
"""
This file was generated by the KCL auto-gen tool. DO NOT EDIT.
Editing this file might prove futile when you re-run the KCL auto-gen generate command.
"""
name = "Backport merged pull request"
on = {
pull_request_target = {
types = [
"closed"
]
}
}
permissions = {
contents = "write"
pull-requests = "write" # Lost ""
}
jobs = {
backport = {
name = "Backport pull request"
runs-on = "ubuntu-latest"
$if = "github.event.pull_request.merged"
steps = [
{
uses = "actions/checkout@v3"
}
{
name = "Create backport pull requests"
uses = "korthout/backport-action@v1"
}
]
}
}
4. What is your KCL components version? (Required)
v0.7.0-alpha.2