Skip to content

Formatter Action doesn't post comments when made from a fork #489

Open
@oxinabox

Description

@oxinabox

When a PR is made from a fork the Formatter failed by doesn't post comments with clickable suggestions:
see: https://github.com/JuliaDiff/ChainRulesCore.jl/pull/488/checks?check_run_id=3854350212#step:5:187

reviewdog: This GitHub token doesn't have write permission of Review API [1],
so reviewdog will report results via logging command [2] and create annotations similar to
github-pr-check reporter as a fallback.
[1]: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request_target,
[2]: https://help.github.com/en/actions/automating-your-workflow-with-github-actions/development-tools-for-github-actions#logging-commands

I am not sure if we can raise the permission on the GITHUB_TOKEN on a fork,
or if we can issue another token that has that permission?

But checks that fail without being easy to act upon suck.
This isn't super hard to do locally, I think it is just

using Pkg: @pkg_str
pkg"activate --temp"
pkg"add JuliaFormatter"
using JuliaFormatter; format("."; verbose=true)

But that is still work.

And especially for PR from newcomers (not @mcabbott 😂 ) who will always be making a PR from a fork, we want things to be smooth.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions