Skip to content

[BUG] TypeScript language options cause upload-database action to fail due to an invalid path error #155

@connoryounglund-bah

Description

@connoryounglund-bah

The issue

Both typescript and javascript-typescript are valid language options accepted by the official GitHub CodeQL analyze action.
However, due to how the upload-database action in this repository is written, using either of these language options causes that action to fail.

The error occurs because the upload-database action in this repo uses inputs.language for the CodeQL database path.
This results in the constructed path looking like codeql_databases/typescript (or codeql_databases/javascript-typescript).
However, when either of these language options are used, the correct path for the databases directory is codeql_databases/javascript.

The upload-database action fails with an error because of this incorrect path being used.

How to fix

To fix this, the upload-database action needs to be updated so that the correct codeql_databases/javascript path is used whenever inputs.language is set to typescript or javascript-typescript.

Additional notes

The project my team works on uses both TypeScript and JavaScript. So we would greatly appreciate if this bug was fixed so we can use the javascript-typescript language option.

I could potentially fork this repo and contribute a fix for this bug myself if y'all are willing to review and merge my PR. 🙂

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions