Skip to content

create-pull-request fails with uncommitted changes that aren't in add-paths #1095

Closed
@agrare

Description

@agrare

Subject of the issue

While testing that running the workflow with no changes does not create a pull request I noticed a failure caused by uncommitted changes which were not in the add-paths list.

I have only a single file in the add-paths list (db/fixtures/aws_instance_types.yml)

ruby/setup-ruby will install gems by default into the vendor/bundle directory in the root of the repository.

Create or update the pull request branch
  /usr/bin/git symbolic-ref HEAD --short
  run_aws_extract_instance_types_weekly
  Working base is branch 'run_aws_extract_instance_types_weekly'
  /usr/bin/git checkout --progress -B a7a8b355-0263-43e8-8559-9fdb32371f80 HEAD --
  Switched to a new branch 'a7a8b355-0263-43e8-8559-9fdb32371f80'
  /usr/bin/git status --porcelain -unormal
  ?? vendor/
  Uncommitted changes found. Adding a commit.
  /usr/bin/git add db/fixtures/aws_instance_types.yml
  /usr/bin/git -c author.name=agrare -c [email protected] -c committer.name=GitHub -c [email protected] commit -m Update AWS instance_types
  On branch a7a8b355-0263-43e8-8559-9fdb32371f80
  Untracked files:
    (use "git add <file>..." to include in what will be committed)
  	vendor/
  
  nothing added to commit but untracked files present (use "git add" to track)
  Error: The process '/usr/bin/git' failed with exit code 1

While we should add vendor/bundle to our .gitignore I think this could be a more general issue, I'd expect any files outside of the scope of what is in add-paths to be ignored.

Steps to reproduce

Create a workflow which modifies a file outside of add-paths

Example failure: https://github.com/agrare/manageiq-providers-amazon/runs/5586172800
Example workflow: https://github.com/agrare/manageiq-providers-amazon/blob/run_aws_extract_instance_types_weekly/.github/workflows/instance_types.yaml

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