Skip to content

GitHub API only supports non-executable files and directories. You may need to add this file to .gitignore #728

Description

@fraxken

Since I migrated to V2.x for changesets V3 I have the following error when there is a bin folder somewhere in my monorepo workspaces

Error: Error: Unexpected executable file at packages/bench/bin/index.ts, GitHub API only supports non-executable files and directories. You may need to add this file to .gitignore
Error: Unexpected executable file at packages/bench/bin/index.ts, GitHub API only supports non-executable files and directories. You may need to add this file to .gitignore

I have seem some issues that seem related but fixed for v1.x..

Did I mess something? My changesets workflow:

https://github.com/JollyPixel/editor/blob/main/.github/workflows/changesets.yml#L42

Activity

  1. bluwy commented on Aug 25, 2026

    @bluwy
    Member

    v2 now uses the GitHub API to push changes to the version PR branch by default, but the GitHub API can't push executables. If you need to push executables, you can set push-with-git-cli: true but you'll miss out on GitHub signing the commits.

    Is your workflow modifying packages/bench/bin/index.ts? We currently run these commands to detect the changed files.

    On the other hand, I think we can improve the error message with information specific to changesets/action

  2. Andarist commented on Aug 25, 2026

    @Andarist
    Member

    npm install changes that file's mode (through its linkAllBins -> binLinks -> fixBin). I'm surprised, though that somehow that stays uncommitted - I'd expect regular dev work in that repo to end up committing this change.

    We could consider doing some changes around this to align the API and CLI modes better:

    action/src/github.ts

    Lines 237 to 244 in 36f529f

    async prepareBranch(branch: string) {
    if (!this.pushWithGitCli) {
    // Preparing a new local branch is not necessary when using the API
    return;
    }
    await switchToMaybeExistingBranch(branch, { cwd: this.cwd });
    await reset(context.sha, { cwd: this.cwd });
    }

    If we'd reset the branch in the API mode then this problem wouldn't happen.

  3. bluwy commented on Aug 25, 2026

    @bluwy
    Member

    Yeah I don't see why we shouldn't do the reset for the GitHub API flow too, it'd also be less surprising that way when switching between modes. I think we can fix it that way if it works.

  4. fraxken commented on Sep 4, 2026

    @fraxken
    Author

    Is it possible for the release to be published please? This impact me on multiple repositories.

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

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