Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

AddSubIssue functions missing

Abierto
#519 1 comentario 1 reacción 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
github, typescript
Área
api, devtools

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

dependencies

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

Error

Additional context
Trying to create sub issues based off an issue template and hitting this error

Lenguaje dominante
TypeScript
Estrellas
5k
Forks
586
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de actions/github-script

Todos los issues de actions/github-script

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.