EndBug / add-and-commit

:octocat: Automatically commit changes made in your workflow run directly to your repo
MIT License
1.14k stars 117 forks source link

Debugging a potential exception #469

Closed aspiringastro closed 1 year ago

aspiringastro commented 1 year ago

Hello, I'm creating a github action that allows notebooks to be automatically executed, and published in HTML, and LaTeX formats for books.

You can review the repository here: https://github.com/aspiringastro/nbaction/

When I use add-and-commit to generate and merge a PR as part of the action, it generates what appears to be an exception - I'm not familiar with node.js enough to pick out the stack trace and would appreciate your insight.

For posterity, here is the actual failed run:

  1. Failed Action
  2. Stack Dump

I'm new to building github actions and it is entirely possible that I misunderstood how to create a automatic commit with this action plugin. Any support is super apprecaited - Thanks!

AJ

aspiringastro commented 1 year ago

Most Recent Run

I was able to make progress on the initial reported exception. I figured out that if I need to pass multiple parameters to the add argument as an array - To try to get around this, I left out the argument using the default . as including all files changed in the repo for the commit.

But, this doesn't seem to be working still -- Again, it is 100% my bug and trying to understand how to debug this correctly. Here is my action.yml:

image

When it is run, the output generated shows no new files have been located in the new folders created in the repo.

image

New Files are created in the target\note and target\html folder but the commit actions doesn't add them into the repo and completes with commit:false

image

I'll continue chasing this down - I would appreciate any help as well.

AJ

aspiringastro commented 1 year ago

I was able to solve this problem. The reason some of the files were not getting added to the commit was due to broad .gitignore tag that matched the destination where the newly created files were being written. This was a silent skip in the code and made it harder (for me) to understand why it was being skipped.