英文:
'YAML syntax error: (): did not find expected key while parsing a block mapping at line 1 column 1' while creating a GitHub issue form
问题
我遇到错误:“YAML语法错误:():在解析块映射时,未找到预期的键,位于第1行第1列”,而我已经创建了另一个GitHub问题表单。
这是我的代码:
name: Bug report
description: 发送一个需要修复的WinUEFI错误报告
title: "[BUG] <title>"
labels: [bug]
body:
- type: markdown
attributes:
value: |
感谢您填写关于WinUEFI的错误报告!这有助于我改进应用程序。请尽量提供详细信息,以便我更容易考虑和审查错误。
我要求您搜索所有问题,以避免重复的错误。如果已经存在一个问题,请回复以补充信息。
在请求错误之前,请确保您使用的是最新版本,并且您要请求的错误在WinUEFI中尚未修复。
- type: textarea
id: bug-and-suggestion-relation
attributes:
label: 您的错误是否与建议相关?
description: 请提供一些关于此请求的背景。为什么您希望它被修复?
validations:
required: true
- type: textarea
id: bug-description
attributes:
label: 描述错误
description: 对错误是什么以及需要修复什么进行清晰而简洁的描述。
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: 描述您考虑过的替代方法
description: 列出您可能尝试修复错误的任何替代方法。
- type: checkboxes
id: agreements
attributes:
label: 协议
description: 请同意以下内容:
options:
- label: 我已搜索并确保没有关于此问题的开放问题。
required: true
- label: 我已确保我报告的错误在最新支持的WinUEFI版本中尚未修复。
required: true
- type: textarea
id: other
attributes:
label: 其他
description: 在下方添加有关功能请求的任何其他上下文或截图。
编辑:我通过纠正其他一些问题来修复它。
-
-
- 我尝试更改名称值,但没有帮助。
-
-
-
- 我期望它能够正确解析并作为模板工作。
-
英文:
I get the error YAML syntax error: (): did not find expected key while parsing a block mapping at line 1 column 1
while I've created another GitHub issue form.
Here is my code:
name: Bug report
description: Send a bug WinUEFI has that needs to be fixed
title: "[BUG] <title>"
labels: [bug]
body:
- type: markdown
attributes:
value: |
Thank you for filling out a bug that WinUEFI has! It helps me make the application better. Please be as detailed as possible so that i may consider and review the bug easier.
I ask that you search all the issues to avoid a duplicate bug. If one exists, please reply if you have anything to add to it.
Before requesting a bug, please make sure you are using the latest version and that the bug you are requesting is not already fixed in WinUEFI.
- type: textarea
id: bug-and-suggestion-relation
attributes:
label: Is your bug related to a suggestion?
description: Please give some context for this request. Why do you want it to be fixed?
validations:
required: true
- type: textarea
id: bug-description
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is and what needs to be fixed.
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Describe alternatives you've considered
description: List any alternatives you might have tried to fix the bug you want.
- type: checkboxes
id: agreements
attributes:
label: Agreements
description: Please agree to the following:
options:
- label: I have searched for and ensured there isn't already an open issue regarding this.
required: true
- label: I have ensured the bug I'm reporting isn't already fixed in the latest supported WinUEFI build.
required: true
- type: textarea
id: other
attributes:
label: Other
description: Add any other context or screenshots about the feature request below.
EDIT: I have fixed it by correcting an another few things.
-
-
- I've tried changing the name value, but it did not help.
-
-
-
- I expected it to parse correctly and work as a template.
-
答案1
得分: 1
你的YAML存在一些问题。首先,labels: [bug]
应该改为 labels: ["but"]
,因为它接受一个字符串数组。
其次,你在缩进方面有很多问题。请记住,YAML对缩进非常敏感。以下是你要寻找的工作YAML示例:
name: Bug report
description: Send a bug WinUEFI has that needs to be fixed
title: "[BUG] <title>"
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thank you for filling out a bug that WinUEFI has! It helps me make the application better. Please be as detailed as possible so that I may consider and review the bug easier.
I ask that you search all the issues to avoid a duplicate bug. If one exists, please reply if you have anything to add to it.
Before requesting a bug, please make sure you are using the latest version and that the bug you are requesting is not already fixed in WinUEFI.
- type: textarea
id: bug-and-suggestion-relation
attributes:
label: Is your bug related to a suggestion?
description: Please give some context for this request. Why do you want it to be fixed?
validations:
required: true
- type: textarea
id: bug-description
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is and what needs to be fixed.
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Describe alternatives you've considered
description: List any alternatives you might have tried to fix the bug you want.
- type: checkboxes
id: agreements
attributes:
label: Agreements
description: "Please agree to the following:"
options:
- label: I have searched for and ensured there isn't already an open issue regarding this.
required: true
- label: I have ensured the bug I'm reporting isn't already fixed in the latest supported WinUEFI build.
required: true
- type: textarea
id: other
attributes:
label: Other
description: Add any other context or screenshots about the feature request below.
英文:
You have several issues going on with your YAML. First, labels: [bug]
should be labels: ["but"]
as that accepts a string array.
Second, you have a lot of issues with spacing. Remember that YAML is highly sensitive to spacing. Here is the working YAML of what you are looking for:
name: Bug report
description: Send a bug WinUEFI has that needs to be fixed
title: "[BUG] <title>"
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thank you for filling out a bug that WinUEFI has! It helps me make the application better. Please be as detailed as possible so that i may consider and review the bug easier.
I ask that you search all the issues to avoid a duplicate bug. If one exists, please reply if you have anything to add to it.
Before requesting a bug, please make sure you are using the latest version and that the bug you are requesting is not already fixed in WinUEFI.
- type: textarea
id: bug-and-suggestion-relation
attributes:
label: Is your bug related to a suggestion?
description: Please give some context for this request. Why do you want it to be fixed?
validations:
required: true
- type: textarea
id: bug-description
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is and what needs to be fixed.
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Describe alternatives you've considered
description: List any alternatives you might have tried to fix the bug you want.
- type: checkboxes
id: agreements
attributes:
label: Agreements
description: "Please agree to the following:"
options:
- label: I have searched for and ensured there isn't already an open issue regarding this.
required: true
- label: I have ensured the bug I'm reporting isn't already fixed in the latest supported WinUEFI build.
required: true
- type: textarea
id: other
attributes:
label: Other
description: Add any other context or screenshots about the feature request below.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论