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

`not found in this repository` when branch renamed before action runs

Đang mở
#1,600 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

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

Hướng nghiên cứu

Bắt đầu với workflow run được liên kết trong issue và kiểm tra repository-fetch step, đặc biệt là lệnh git fetch nhắm đến refs/remotes/origin/patch-1. Tái hiện chuỗi thao tác tạo một commit, kích hoạt workflow và đổi tên branch trước khi thực thi; được coi là hoàn tất khi run vẫn có thể phân giải branch hoặc commit ban đầu thay vì báo rằng ref bị thiếu.

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

Mô tả

#1572 has the same error message, but is for a more interesting case.

Here, I used github's editor to create a commit, it automatically created a patch-1. That triggered a workflow:

https://github.com/jsoref/pdns/actions/runs/4486688011

Fetching the repository
/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +46056980cc77a5a76310b821f7d851913efcb51d:refs/remotes/origin/patch-1

...

ref 'refs/heads/patch-1' not found in this repository

As soon as I created the commit, I visited https://github.com/jsoref/pdns/branches and renamed the branch.

It isn't unreasonable for a flow like this to happen (I wasn't trying to break my own workflow, it's just a flow I take regularly).

Expected results: Ideally the action should be able to find the branch from the point in time when the workflow started and properly resolve things instead of from when the action itself starts running. There's nothing wrong w/ a workflow wanting to have a sarif report about a branch even if the branch is no longer...

Ngôn ngữ chính
TypeScript
Star
1.6k
Fork
493
Merge trung bình
1 ngày 13 giờ
Pull request đã merge (30 ngày)
44

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

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

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 github/codeql-action

Tất cả issue của github/codeql-action

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.