Expose a public Go library API for `gh-actions-lock`

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

Maintainer thường phản hồi trong vòng 1 ngày

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

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go
Lĩnh vực
api, cli

Hướng nghiên cứu

Start by reading the CLI's core implementation under internal/ and trace how it performs locking, relocking, verification, and inspection. Then assess how those operations could be exposed as a typed, context-aware API without requiring gh; done means external Go applications can call the proposed operations through a public package such as pkg/actionslock.

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

Mô tả

Motivation

gh-actions-lock keeps its core functionality under internal/, forcing external Go applications to invoke the CLI instead of using a type-safe Go API.

Proposal

Expose a public Go package, such as pkg/actionslock, providing typed, context-aware APIs for locking, relocking, verification, and inspection, while reusing the CLI's core implementation without requiring gh.

Usage

Verify a repository directly from Go using an illustrative API:

import "github.com/github/gh-actions-lock/pkg/actionslock"

result, err := actionslock.Verify(ctx, actionslock.Options{RepositoryRoot: "."})
Ngôn ngữ chính
Go
Star
317
Fork
24
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
50

Chuẩn bị môi trường

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/gh-actions-lock

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

Issue tương tự

Thêm issue về Go

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.