Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

Update octokit dependency to match online documentation

Ouverte
#470 6 commentaires 2 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
2/5
Temps estimé
1-3 heures
Accessibilité débutants
45/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
À l'abandon
Stack technique
github-actions, javascript
Domaine
api, ci-cd

Piste de recherche

Start with package-lock.json around the octokit dependency entry linked in the issue and confirm the resolved version is below 10.1.0. Update the dependency resolution to at least 10.1.0, then verify that the documented getCopilotSeatDetailsForUser method is available in the action's GitHub REST client.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

dependencies

EDIT: the following is still correct, but due to using an outdated version of octokit. After digging some more, it was deprecated 7 months ago:

It would be solved by updating the octokit dependency to at least 10.1.0.

Previous issue:

Describe the bug
The properties defined in octokit.rest.copilot are not consistent with the documentation. It seems the function getCopilotSeatDetailsForUser has been renamed to getCopilotSeatAssignmentDetailsForUser.
According to the octokit doc, the function to get a user's copilot details is done with

octokit.rest.copilot.getCopilotSeatDetailsForUser({
  org,
  username,
});

Using this method within this action fails.

To Reproduce

  1. In a repository, create basic action
name: Issue Workflow
on:
  issues:
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Run GitHub Script
        uses: actions/github-script@v7
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          script: |
            console.log(Object.keys(github.rest.copilot))
            console.log(github.rest.copilot.getCopilotSeatDetailsForUser({
              org: "MyOrg",
              username: "MyUsername",
            }));
  1. Trigger the action with an issue
  2. The output is
 [
  'addCopilotForBusinessSeatsForTeams',
  'addCopilotForBusinessSeatsForUsers',
  'cancelCopilotSeatAssignmentForTeams',
  'cancelCopilotSeatAssignmentForUsers',
  'getCopilotOrganizationDetails',
  'getCopilotSeatAssignmentDetailsForUser',
  'listCopilotSeats'
]
TypeError: github.rest.copilot.getCopilotSeatDetailsForUser is not a function
    at eval (eval at callAsyncFunction (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:35424:16), <anonymous>:4:33)
    at callAsyncFunction (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:35425:12)
    at main (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:35522:26)
    at /home/runner/work/_actions/actions/github-script/v7/dist/index.js:35497:1
    at /home/runner/work/_actions/actions/github-script/v7/dist/index.js:35553:3
    at Object.<anonymous> (/home/runner/work/_actions/actions/github-script/v7/dist/index.js:35556:12)
    at Module._compile (node:internal/modules/cjs/loader:1241:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Module._load (node:internal/modules/cjs/loader:938:12)

Expected behavior
The documented function getCopilotSeatDetailsForUser should work, as it does locally.

Screenshots
N/A

Desktop (please complete the following information):

  • OS: macOS
  • Browser Firefox
  • Version 125

Additional context
(I'm not sure if the problem comes from here specifically, but because the same code works locally but not within this action, it's my first hunch)

Langage dominant
TypeScript
Étoiles
5k
Forks
586
Métriques de merge des PR
Aucune PR mergée en 30 j

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de actions/github-script

Toutes les issues de actions/github-script

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.