Skip to content

Some CI workflows always fail for external contributors #5062

Closed

Description

@jamescrosswell

Description

External contributors cannot push directly to sentry-dotnet so must instead create a fork of the repo from which they make pull requests. When running our CI checks on forked repos, these CI checks always fail:

  • Changelog Preview
  • Format Code
  • Warden

For example, see #5025:

Image

The repo is mattico rather than sentry-dotnet.

Changelog Preview

Fails with:

Running craft changelog --pr 5025 --format json...
Using comment mode...
Creating new comment...
gh: Resource not accessible by integration (HTTP 403)
{"message":"Resource not accessible by integration","documentation_url":"https://docs.github.com/rest/issues/comments#create-an-issue-comment","status":"403"}
Error: Process completed with exit code 1.

Format Code

Run ./scripts/commit-formatted-code.sh $GITHUB_HEAD_REF fails with:

error: pathspec 'spotlight-backoff' did not match any file(s) known to git
Error: Process completed with exit code 1.

... since it tries to push the resulting changes to sentry-dotnet, where that branch does not exist.

Warden

Fails with:

Run actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf
Input 'repositories' is not set. Creating token for all repositories owned by getsentry.
Error: [@octokit/auth-app] appId option is required
    at createAppAuth (/home/runner/work/_actions/actions/create-github-app-token/29824e69f54612133e76f7eaac726eef6c875baf/dist/main.cjs:44158:11)
    at main (/home/runner/work/_actions/actions/create-github-app-token/29824e69f54612133e76f7eaac726eef6c875baf/dist/main.cjs:44448:17)
    at Object.<anonymous> (/home/runner/work/_actions/actions/create-github-app-token/29824e69f54612133e76f7eaac726eef6c875baf/dist/main.cjs:44572:20)
    at Module._compile (node:internal/modules/cjs/loader:1521:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1623:10)
    at Module.load (node:internal/modules/cjs/loader:1266:32)
    at Module._load (node:internal/modules/cjs/loader:1091:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:164:12)
    at node:internal/main/run_main_module:28:49
Error: [@octokit/auth-app] appId option is required

I'm not sure if it's possible to run these workflows when the PR comes from a forked repo, since they require permissions in the remote repo.

We should probably just disable them if the PR originates from a fork.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

.NETBug

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions