AddSubIssue functions missing
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- github, typescript
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- TypeScript
- スター
- 5k
- フォーク
- 586
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
actions/github-script のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
actions/github-script#728 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
actions/github-script#727 · リアクション 1 件 ·
-
{ オープン
難易度 5/5 1週間以上 初心者へのやさしさ 10/100
actions/github-script#724 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
actions/github-script#723 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
actions/github-script#714 · コメント 1 件 · リアクション 4 件 ·
actions/github-script の issue をすべて見る
似ている issue
-
blocklist removal
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
MetaMask/eth-phishing-detect#296544 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
pastelsky/bundlephobia#1122 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
category/development priority/P2 scope/file-operations scope/testing type/enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100