Skip to content

Commit

Permalink
增加 tasklist 标签,修复 UT 测试
Browse files Browse the repository at this point in the history
  • Loading branch information
NMSAzulX committed Jan 1, 2024
1 parent 73c95f1 commit fde1aee
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .github/NMS_TEMPLATE/bug.issue.template
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ body:
multiple: true
description: What version of our software are you running?
options:
- .NET8(LTS) (Default)
- .NET7(STS)
- .NET6(LTS) (Default)
- .NET6(LTS)
- .NET5
- .NET Core 3.1(LTS)
- .NET Core 3.0
Expand Down
15 changes: 15 additions & 0 deletions tasklist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: 📃 发起任务
about: 这里将发起一个任务,谁发起谁主导,不可强制他人完成.
title: '[Task]:'
labels: task

---

### 📃计划清单

```[tasklist]
### Natasha 动态方法使用率
- [x] 1. 已完成计划xxxx。
- [ ] 2. 未完成计划xxxxx。
```
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
using Natasha.CSharp.Builder;
using System;
using System.ComponentModel;
using Xunit;

namespace NatashaFunctionUT.Template
{

[Trait("基础功能测试", "模板")]
public class MethodTemplateTest
public class MethodTemplateTest: DomainPrepareBase
{

[Fact(DisplayName = "静态方法1")]
Expand Down
13 changes: 6 additions & 7 deletions test/workflow/Workflow.Runner/Runner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,14 @@ public async Task InitLabels()
Assert.Fail(repoId);
}
NMSGithubSdk.SetGraphSecretByEnvKey("GITHUB_TOKEN");
var labels = SolutionRecorder.GetNewestSolution().GetAllLabels();
var labels = new List<GithubLabelBase>(SolutionRecorder.GetNewestSolution().GetAllLabels());
if (labels != null && labels.Any())
{
var labelsWithBlockUser = labels
.Append(new GithubLabelBase() { Name = "aaa-block-user", Color = "ff0000", Description = "该标签为屏蔽标签,打上该标签的 ISSUE 作者将被屏蔽." })
.Append(new GithubLabelBase() { Name = "phasee-done", Color = "020E91", Description = "任务或计划阶段性结束." })
.Append(new GithubLabelBase() { Name = "continuous", Color = "AEB941", Description = "该问题或建议或编码任务将持续进行." })
;
var result = await NMSGithubSdk.ExpectLabelsCreateAndUpadateAsync(labelsWithBlockUser, repoId, ownerName, repoName);
labels.Add(new GithubLabelBase() { Name = "aaa-block-user", Color = "ff0000", Description = "该标签为屏蔽标签,打上该标签的 ISSUE 作者将被屏蔽." });
labels.Add(new GithubLabelBase() { Name = "phasee-done", Color = "020E91", Description = "任务或计划阶段性结束." });
labels.Add(new GithubLabelBase() { Name = "continuous", Color = "AEB941", Description = "该问题或建议或编码任务将持续进行." });
labels.Add(new GithubLabelBase() { Name = "tasklist", Color = "bfdadc", Description = "计划任务清单." });
var result = await NMSGithubSdk.ExpectLabelsCreateAndUpadateAsync(labels, repoId, ownerName, repoName);
if (result != string.Empty)
{
Assert.Fail(result);
Expand Down

0 comments on commit fde1aee

Please sign in to comment.