Skip to content

GitHub workflow output format #10260

Closed
@codingjoe

Description

@codingjoe

Current problem

Hi there 👋,

GitHub supports a special output format for workflow, that enables the workflow to create code comments on pull-requests.

We currently use a GitHub workflow similar to this:

  pylint:
    name: PyLint
    runs-on: ubuntu-latest
    env:
      DJANGO_SETTINGS_MODULE: my.app.settings
    strategy:
      matrix:
        type:
          - name: error
            enable: E,F
            disable: E0401
          - name: warning
            enable: W
            disable: ''
          - name: notice
            enable: R,C
            disable: C0114,C0115,C0116
          - name: debug
            enable: I
            disable: ''

    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version-file: 'pyproject.toml'
      - run: python -m pip install pylint
      - run: pylint --load-plugins pylint_django --exit-zero --msg-template='::${{matrix.type.name}} file={path},line={line},lineEnd={end_line},col={column},colEnd={end_column},title={symbol} ({msg_id})::{msg}' --disable=all --enable=${{matrix.type.enable}} --disable=${{matrix.type.disable}} . --out

However, this will cause PyLint to run multiple times, wasting precious compute time.

Desired solution

I'd love to native support --output-format=github that correctly sets the message type for GitHub. This is the only thing, that you currently can't achieve with --message-template.

Since GitHub is a rather popular collaboration platform, I believe this feature would be welcome by other community members 😉

Additional context

https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/workflow-commands-for-github-actions

Metadata

Metadata

Assignees

No one assigned

    Labels

    Documentation 📗Needs PRThis issue is accepted, sufficiently specified and now needs an implementation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions