We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bacacde commit cf4e5e3Copy full SHA for cf4e5e3
2 files changed
.github/workflows/issue_label_rule.yml
@@ -19,6 +19,24 @@ jobs:
19
run: |
20
git fetch --all
21
22
+ - name: Check Issue Title Format
23
+ uses: actions/github-script@v6
24
+ with:
25
+ script: |
26
+ const issueNumber = context.payload.issue.number;
27
+ const issueTitle = context.payload.issue.title;
28
+
29
+ const titlePattern = new RegExp(`^\\d+\\s*-\\s*`);
30
+ if (!titlePattern.test(issueTitle)) {
31
+ const formattedTitle = `${issueNumber} - ${issueTitle}`;
32
+ await github.rest.issues.update({
33
+ owner: context.repo.owner,
34
+ repo: context.repo.repo,
35
+ issue_number: issueNumber,
36
+ title: formattedTitle
37
+ });
38
+ }
39
40
- name: Get Issue Details
41
id: issue_details
42
.github/workflows/issue_name_rule.yml
0 commit comments