You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This would be neat to have for deptry when someone runs it inside a GitHub action/workflow since it would visually point at the exact file and line that is causing issues.
GitHub supports annotating PRs with comments attached to relevant files/lines - for example, https://github.com/pytest-dev/pytest-github-actions-annotate-failures is a plugin that does this for pytest failures.
Describe the solution you would like
This would be neat to have for deptry when someone runs it inside a GitHub action/workflow since it would visually point at the exact file and line that is causing issues.
It is pretty straightforward to implement - you can see how it's done in the above pytest plugin. At a glance, you already have all relevant information (filename, line number, comment). It can be turned on either with an optional
--argument
, or automatically detect that it's running within a workflow by inspecting os.environ as is done by pytest plugin: https://github.com/pytest-dev/pytest-github-actions-annotate-failures/blob/v0.2.0/pytest_github_actions_annotate_failures/plugin.py#L36Additional context
Official documentation for this output format is here: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#example-setting-a-notice-message
The text was updated successfully, but these errors were encountered: