Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Update octokit dependency to match online documentation

Đang mở
#470 6 bình luận 2 reaction 0 người được giao Xem trên GitHub

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
45/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
github-actions, javascript
Lĩnh vực
api, ci-cd

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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)

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

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của actions/github-script

Tất cả issue của actions/github-script

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.