Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v5.0.7 regression: not detecting fork correctly anymore (maybe due to use of workflow_call) #1708

Open
wdconinc opened this issue Nov 29, 2024 · 0 comments
Assignees

Comments

@wdconinc
Copy link

As of presumably #1690, v5.0.7, we are noticing that the detection of forked repositories has ceased to function as before.

Before:

  • GITHUB_EVENT_PULL_REQUEST_HEAD_LABEL: spack:dependabot/github_actions/codecov/codecov-action-5.0.3
  • GITHUB_EVENT_PULL_REQUEST_REPO_FULL_NAME:
  • GITHUB_REPOSITORY: spack/spack

After:

  • GITHUB_EVENT_PULL_REQUEST_HEAD_LABEL: spack:dependabot/github_actions/codecov/codecov-action-5.0.7
  • GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FULL_NAME: spack/spack
  • GITHUB_REPOSITORY: spack/spack

Diff:

  GITHUB_EVENT_PULL_REQUEST_HEAD_LABEL: spack:dependabot/github_actions/codecov/codecov-action-5.0.7
- GITHUB_EVENT_PULL_REQUEST_REPO_FULL_NAME: 
+ GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FULL_NAME: spack/spack
  GITHUB_REPOSITORY: spack/spack

Since we call this as a workflow_call, the codecov-actions for the fork runs with the upstream GITHUB_REPOSITORY. The test [ "${GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FULL_NAME}" != "$GITHUB_REPOSITORY" ] fails, where previously [ "${GITHUB_EVENT_PULL_REQUEST_REPO_FULL_NAME}" != "$GITHUB_REPOSITORY" ] used to succeed and result in TOKENLESS getting set.

It appears that the previous behavior may have been unintentional since GITHUB_EVENT_PULL_REQUEST_REPO_FULL_NAME was empty, and #1690 fixed that.

It is possible this is related to #1705, but we do not see any issues with curl calls, and we are using workflow_call which may affect how the event is passed (though the docs indicate that the original pull_request event payload is forwarded).

Ref: spack/spack#47732.

@thomasrockhu-codecov thomasrockhu-codecov self-assigned this Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants