Skip to content

GitHub workflow output format #10260

Closed

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

Activity

  1. added
    Needs triage 📥Just created, needs acknowledgment, triage, and proper labelling
    on Mar 7, 2025
  2. codingjoe commented on Mar 7, 2025

    @codingjoe
    ContributorAuthor

    I'd be happy to provide a patch myself, if that were helpful 😃

  3. jacobtylerwalls commented on Mar 8, 2025

    @jacobtylerwalls
    Member

    Hey @codingjoe, we have that already (example, release note), but clearly we need some docs to make it more discoverable.

  4. added
    Needs PRThis issue is accepted, sufficiently specified and now needs an implementation
    and removed
    Needs triage 📥Just created, needs acknowledgment, triage, and proper labelling
    on Mar 8, 2025
  5. Pierre-Sassoulas commented on Mar 8, 2025

    @Pierre-Sassoulas
    Member

    If we do #4322, the discoverability would be great.

  6. added a commit that references this issue on Mar 10, 2025
  7. codingjoe commented on Mar 10, 2025

    @codingjoe
    ContributorAuthor

    Image

    @jacobtylerwalls thanks mate 🥇 I could have just tried github ;)
    I created a tiny PR to help the next person: #10272

  8. added a commit that references this issue on Mar 10, 2025
  9. added a commit that references this issue on Mar 10, 2025
  10. added a commit that references this issue on Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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