Upload database with commit SHA and branch name

Aperta
#1,399 8 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@aeisenberg ci sta già lavorando.

Dal 28/11/2022.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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"
  }
]
Lingua principale
TypeScript
Stelle
1.6k
Fork
493
Merge medio
1g 13h
PR unite (30g)
44

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di github/codeql-action

Tutte le issue di github/codeql-action

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.