Skip to content

Commit

Permalink
refactor: prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
yvonneyx committed Feb 7, 2025
1 parent 1300e57 commit 8adfbbd
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 32 deletions.
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/1.bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: "🐞 Bug Report"
name: '🐞 Bug Report'
description: Create a report to help us improve, Ask questions in Discussions / 创建一个问题报告以帮助我们改进,提问请到 Discussions
title: "[Bug]: "
labels: ["waiting for maintainer"]
title: '[Bug]: '
labels: ['waiting for maintainer']
body:
- type: markdown
attributes:
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/2.feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ body:
id: description
attributes:
label: Describe the feature / 功能描述
description: "What problem does this feature solve? / 这个功能解决什么问题?"
description: 'What problem does this feature solve? / 这个功能解决什么问题?'
placeholder: |
I would like to see... because...
我希望能有... 因为...
Expand Down
28 changes: 14 additions & 14 deletions .github/ISSUE_TEMPLATE/3.docs_feedback.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: "📖 Docs Feedback"
description: "Help us make our docs better! Share your thoughts and suggestions / 帮助我们改进文档!分享您的想法和建议"
labels: ["waiting for maintainer"]
title: "[docs]: "
name: '📖 Docs Feedback'
description: 'Help us make our docs better! Share your thoughts and suggestions / 帮助我们改进文档!分享您的想法和建议'
labels: ['waiting for maintainer']
title: '[docs]: '
body:
- type: markdown
attributes:
Expand All @@ -15,30 +15,30 @@ body:
- type: input
id: page-url
attributes:
label: "📍 Which page are you reading?"
label: '📍 Which page are you reading?'
description: "Please share the URL of the page you'd like to give feedback on / 请分享您想要反馈的页面链接"
placeholder: "https://docs.example.com/"
placeholder: 'https://docs.example.com/'
validations:
required: true

- type: dropdown
id: feedback-type
attributes:
label: "💭 What's on your mind?"
description: "What kind of feedback would you like to share? / 您想分享什么类型的反馈?"
description: 'What kind of feedback would you like to share? / 您想分享什么类型的反馈?'
options:
- "Could be clearer / 需要更清晰的解释"
- "Missing information / 信息不完整"
- "Example needs fixing / 示例需要修复"
- "Content needs updating / 内容需要更新"
- "Other suggestions / 其他建议"
- 'Could be clearer / 需要更清晰的解释'
- 'Missing information / 信息不完整'
- 'Example needs fixing / 示例需要修复'
- 'Content needs updating / 内容需要更新'
- 'Other suggestions / 其他建议'
validations:
required: true

- type: textarea
id: description
attributes:
label: "🤔 Tell us more"
label: '🤔 Tell us more'
description: |
Let us know what went wrong when you were using this documentation and what we could do to improve it | 请告知您在使用此文档时遇到的问题以及我们可以改进的地方
placeholder: |
Expand All @@ -57,7 +57,7 @@ body:
- type: textarea
id: suggestion
attributes:
label: "💡 Got any suggestions?"
label: '💡 Got any suggestions?'
description: |
What are you trying to accomplish? Providing context helps us come up with a solution that is more useful in the real world | 您希望实现什么目标?提供上下文有助于我们提出更实用的解决方案
placeholder: |
Expand Down
21 changes: 7 additions & 14 deletions .github/workflows/scripts/closeOnRelease.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,17 @@ module.exports = async ({ core, github, context }) => {
const owner = context.repo.owner;
const repo = context.repo.repo;

const label = "resolved pending release";
const resolvedLabel = "resolved";
const label = 'resolved pending release';
const resolvedLabel = 'resolved';

const issuesPendingRelease = (
await github.paginate(github.rest.issues.listForRepo, {
owner,
repo,
state: "open",
state: 'open',
per_page: 100,
})
).filter(
(i) =>
i.pull_request === undefined &&
i.labels.map((l) => l.name).includes(label)
);
).filter((i) => i.pull_request === undefined && i.labels.map((l) => l.name).includes(label));

let failedIssues = 0;

Expand All @@ -40,7 +36,7 @@ module.exports = async ({ core, github, context }) => {
const release = releases.length > 0 ? releases[0] : undefined;

if (release === undefined) {
throw new Error("There is no release available");
throw new Error('There is no release available');
}

const message = `:tada: This issue has been resolved and is now available in the [${release.tag_name}](${release.html_url}) release! :tada:`;
Expand Down Expand Up @@ -75,13 +71,10 @@ module.exports = async ({ core, github, context }) => {
owner,
repo,
issue_number: number,
state: "closed",
state: 'closed',
});
} catch (error) {
console.error(
`Failed to comment on and/or close issue #${number}`,
error
);
console.error(`Failed to comment on and/or close issue #${number}`, error);
failedIssues++;
}

Expand Down
6 changes: 6 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
printWidth: 120,
proseWrap: 'never',
singleQuote: true,
trailingComma: 'all',
};

0 comments on commit 8adfbbd

Please sign in to comment.