github / github/command

Getting started not working

Đang mở
#49 4 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug
Ngôn ngữ chính
JavaScript
Star
167
Fork
17
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### Describe the Issue

I'm trying this action in an empty repository and I'm not able to make it working. It says something about missing permissions but it's not specifying which one is missing.

I put the attached workflow in main branch, then I opened a pull request and commented it with

```
.ping | LOG_LEVEL=debug,CPU_CORES=4
```

### Action Configuration

```yaml
name: "command demo"

# the workflow to execute on is comments that are newly created
on:
issue_comment:
types: [ created ]

# permissions needed for reacting to IssueOps commands on issues and PRs
permissions:
pull-requests: write
issues: write
checks: read

jobs:
demo:
runs-on: ubuntu-latest
steps:
# execute IssueOps command logic, hooray!
# this will be used to "gate" all future steps below
- uses: github/command@v1.2.2
id: ping
with:
command: ".ping"

# run your custom logic for your project here - example seen below

# conditionally run some logic here
- name: ping command
if: ${{ steps.ping.outputs.continue == 'true' }}
run: echo 'Got comment in PR \#${{ steps.ping.outputs.issue_number }} with params ${{ steps.ping.outputs.params }}'
```

### Relevant Actions Log Output

```
Run github/command@v1.2.2
##[debug]checking if the context of 'issue_comment' is valid
🧮 detected parameters in command: LOG_LEVEL=debug,CPU_CORES=4
##[debug]raw allowlist value: false
##[debug]no allowlist provided, all users are allowed
Error: GraphqlResponseError: Request failed due to following response errors:
- Resource not accessible by integration
at /home/runner/work/_actions/github/command/v1.2.2/node_modules/@octokit/graphql/dist-node/index.js:113:1
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at prechecks (/home/runner/work/_actions/github/command/v1.2.2/src/functions/prechecks.js:129:1)
at run (/home/runner/work/_actions/github/command/v1.2.2/src/main.js:78:1)
Error: Request failed due to following response errors:
- Resource not accessible by integration
```

### Extra Information

It would be very useful if the action uses some `core.debug` calls in its codebase to better track issues like this one. At the moment even with debug mode there is no output from the action itself.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Tái hiện lỗi bằng workflow GitHub Actions và lệnh comment được cung cấp, sau đó kiểm tra src/functions/prechecks.js và src/main.js, là những tệp xuất hiện trong nhật ký của action. Kiểm tra cách yêu cầu prechecks xử lý lỗi quyền được báo cáo và đầu ra gỡ lỗi được phát ra ở đâu. Được xem là hoàn tất khi có thể xác định quyền còn thiếu và action cung cấp các chi tiết gỡ lỗi hữu ích.

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

Đánh giá

Công nghệ
github-actions, javascript
Lĩnh vực
ci-cd, devops
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

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.