Upload database with commit SHA and branch name

未关闭
#1,399 8 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

@aeisenberg 已经在做这个了。

开始于 2022年11月28日。

评估

这个 Issue 还没有评估数据。

描述

CodeQL Action enhancement

Would it be possible to extend the CodeQL database upload/download API to contain the commit sha and branch name?
Having a database but not knowing which source code version it is belonging too, is not very useful.

This is code from src/database-upload.ts. Perfect place to pass the SHA and branch.

        `POST https://uploads.github.com/repos/:owner/:repo/code-scanning/codeql/databases/:language?name=:name`,
        {
          owner: repositoryNwo.owner,
          repo: repositoryNwo.repo,
          language,
          name: `${language}-database`,
          data: payload,
          headers: {
            authorization: `token ${apiDetails.auth}`,
            "Content-Type": "application/zip",
          },
        }

When calling the database list API:
https://api.github.com/repos/{repository full name}/code-scanning/codeql/databases

It would be nice to see the branch name and commit sha in the response.

[
{
    "id": 11071980,
    "name": "javascript-database",
    "language": "javascript",
    "uploader": {
            --- REMOVED TO REDUCE COMPLEXITY ---
    },
    "content_type": "application/zip",
    "size": 5680496,
    "created_at": "2022-11-28T14:19:59Z",
    "updated_at": "2022-11-28T14:19:59Z",
    "url": "https://api.github.com/repositories/553492177/code-scanning/codeql/databases/javascript"
  }
]
主要语言
TypeScript
星标
1.6k
派生
493
平均合并
1 天 13 小时
30 天内合并 PR
44

贡献指南

打开贡献指南

从这里开始

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

github/codeql-action 的其他 Issue

查看 github/codeql-action 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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