Thanks to visit codestin.com
Credit goes to github.com

Skip to content

CI GitHub actions not pulling the branch from a fork to test and build the PR coming from a forkΒ #979

Closed
@exequiel09

Description

@exequiel09

Description

In #974 CI action, It tries to pull my branch in the main repo instead of the forked repo. See the logs.

I think the line in the GitHub action below only works when someone from the organization creates a pull request but not from someone outside the organization who has to fork the repo to create a PR.

ref: ${{ github.event.pull_request.head.ref }}

Steps to Reproduce the Issue

Fork the repo. Create a PR and let the maintainer run the CI for first time contributors to this repo like me πŸ˜….

Notes

I think we need to use github.ref or $GITHUB_REF to get the ref to the PR from forks. Other instances of happening this is in #678 (logs)

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