Skip to content

Push the formatting changes to the fork on:pull_request #54

Open
@yaacine

Description

@yaacine

Hi 👋
thanks for the great job you did on this action ,

I was trying to commit the formatted files into a PR made from a fork on a private repository (where this feature of running workflows from forks is enabled).
So I used this action

    # push the formatting changes to the PR itself
      - name: Commit autopep8 changes
        if: steps.autopep8.outputs.exit-code == 2
        run: |
          git config --global user.name 'Peter Evans'
          git config --global user.email '[email protected]'
          git commit -am "Automated autopep8 fixes"
          git push

but it seems that it's trying to push to the base repo not the fork itself.
and I got this error


remote: Repository not found.
fatal: repository 'https://github.com/<org_name>/<repo_name>/' not found
Error: Process completed with exit code 128.

Knowing that there are couple of developers who forked this repo and want to run the formatting action when they open a PR to the base repo ,Is there any way to address my use case please ?

Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions