Update octokit dependency to match online documentation
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
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ả
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
- 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",
}));
- Trigger the action with an issue
- 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
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của actions/github-script
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
actions/github-script#728 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
actions/github-script#727 · 1 reaction ·
-
{ Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 10/100
actions/github-script#724 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
actions/github-script#723 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
actions/github-script#714 · 1 bình luận · 4 reaction ·
Tất cả issue của actions/github-script
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
bug v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
modelcontextprotocol/inspector#2458 · 1 bình luận ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
railmapgen/rmp-gallery#4068 ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
carbon-design-system/ibm-products#9907 ·