AddSubIssue functions missing
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- github, typescript
Hướng nghiên cứu
Start by checking how this repository exposes the Octokit REST client and which Octokit version it uses; the report shows that issues.addSubIssue is missing while the latest release documents it. Reproduce the GitHub Actions script from the issue, then verify that the sub-issue call is available and creates the expected link.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
github.rest.issues.addSubIssue is not a function, octokit has the function in the latest release
To Reproduce
Run a github action to create a sub issue:
- name: Create linked sub-issues from tasklist
uses: actions/github-script@v7.0.1
with:
script: |
const issueBody = context.payload.issue.body
const parentIssueNumber = context.payload.issue.number
// Extract the content between ```[tasklist] and ```
const matchTasklist = issueBody.match(/```\[tasklist\]([\s\S]*?)```/)
if (!matchTasklist) {
core.info('No [tasklist] section found in the issue body.')
return
}
const tasklistContent = matchTasklist[1]
// Identify lines that match '- [ ] ...'
const tasks = tasklistContent.match(/^- \[ \] .+/gm) || []
for (const task of tasks) {
const title = task.replace(/^- \[ \] /, '').trim()
const newIssue = await github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: title,
body: `Sub-issue of #${parentIssueNumber}`
})
// Link the sub issue to the parent issue
await github.rest.issues.addSubIssue({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: parentIssueNumber,
sub_issue_id: newIssue.data.id
})
// Comment on the parent issue linking the new sub-issue
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: parentIssueNumber,
body: `Created sub-issue: #${newIssue.data.number} for task: "${title}"`
})
}
Expected behavior
A sub issue should be created based on the inputs
Screenshots
Additional context
Trying to create sub issues based off an issue template and hitting this error
- Ngôn ngữ chính
- TypeScript
- Star
- 5k
- Fork
- 586
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của actions/github-script
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
actions/github-script#728 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
actions/github-script#727 · 1 reaction ·
-
{ Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 10/100
actions/github-script#724 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
actions/github-script#723 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
actions/github-script#714 · 1 bình luận · 4 reaction ·
Tất cả issue của actions/github-script
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
-
Add: Star Sports 2 Telugu HD Đang mởcheck:passed streams:add
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100