Skip to content

feat: switch the lgmt parser to external javascript file and write tests for it #5500

@Skarlso

Description

@Skarlso

Is your feature request related to a problem? Please describe.

Our /lgtm determination thing is in inlined javascript. This rather difficult to maintain and even worse to test.

We should switch it to Javascript and write tests for it.

Describe the solution you'd like

File:
.github/scripts/lgtm-processor.js
.github/scripts/lgtm-processor-test.js

Reference:

        id: compute
        uses: actions/github-script@v8
        env:
          # anything that's required here
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          script: |
            const script = await import('${{ github.workspace }}/.github/scripts/lgtm-processor.js');
            await script.default({ core, github, context });

The script would have a proper test to make sure parsing and folder handling works as expected.

Describe alternatives you've considered

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/ciPull requests that update Github_actions codegood first issueGood for newcomerskind/featureCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions