Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Create a token for all repositories in the current owner's installation

未关闭 适合新手
#377 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
1/5
预计耗时
1-3 小时
新手友好度
72/100
Issue 类型
文档
描述清晰度
描述清楚
活跃度
冷清
技术栈
github-actions, javascript
领域
documentation

调研方向

从链接的文档部分“Create a token for all repositories in the current owner's installation”开始,检查 owner 和 repositories 属性的说明。更新措辞,以区分显式设置的 owner 与默认的当前仓库 owner,然后验证文档中说明的访问范围是否与示例和报告的行为一致。

由索引模型根据 Issue 内容生成。

描述

The docs currently have a section called Create a token for all repositories in the current owner's installation. It comes with a clean example:

on: [workflow_dispatch]

jobs:
  hello-world:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/create-github-app-token@v3
        id: app-token
        with:
          client-id: ${{ vars.APP_CLIENT_ID }}
          private-key: ${{ secrets.APP_PRIVATE_KEY }}
          owner: ${{ github.repository_owner }}
      - uses: peter-evans/create-or-update-comment@v4
        with:
          token: ${{ steps.app-token.outputs.token }}
          issue-number: ${{ github.event.issue.number }}
          body: "Hello, World!"

I find the documentation of the owner and repositories properties a bit misleading though.

owner
Optional: The owner of the GitHub App installation. If empty, defaults to the current repository owner.

To me this means if I don't set owner explicitly, owner will be set to "the current repository owner". I conclude that if my repository lives under my org example-org/my-repo, I expect owner to be set to example-org.

repositories
Optional: Comma or newline-separated list of repositories to grant access to.
Note
If owner is set and repositories is empty, access will be scoped to all repositories in the provided repository owner's installation. If owner and >repositories are empty, access will be scoped to only the current repository.

"If owner is set".

According to my tests, owner does not count as set when left empty, even though owner property description says it automatically falls back to the repositories owner.

Suggestion, change wording in docs to:

If owner is set explicitly and repositories is empty, access will be scoped to all repositories in the provided repository owner's installation. If owner and repositories are empty, access will be scoped to only the current repository.

主要语言
JavaScript
星标
886
派生
174
PR 合并指标
30 天内没有已合并 PR

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

actions/create-github-app-token 的其他 Issue

查看 actions/create-github-app-token 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。