AddSubIssue functions missing
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 35/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Estagnada
- Stack de tecnologia
- github, typescript
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
- Linguagem predominante
- TypeScript
- Estrelas
- 5k
- Forks
- 586
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de actions/github-script
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 48/100
actions/github-script#728 ·
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 52/100
actions/github-script#727 · 1 reação ·
-
{ Aberta
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 10/100
actions/github-script#724 ·
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 55/100
actions/github-script#723 · 1 comentário ·
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 55/100
actions/github-script#714 · 1 comentário · 4 reações ·
Todas as issues de actions/github-script
Issues semelhantes
-
blocklist removal
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
MetaMask/eth-phishing-detect#296544 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
pastelsky/bundlephobia#1122 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
-
category/development priority/P2 scope/file-operations scope/testing type/enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100