Github Integration: Bubble Commits Delete .gitignore and test files

Hi,

I’m using the github integration and for the most part it works great - but I have automated unit tests to validate there are no stupid bugs before pushing code so I can cycle faster and validate code correctness without having to get all the way to deploying the plugin inside of a test application to find out if it actually works or not.

Occasionally it’s easier to make a change from the bubble side, especially w.r.t. metadata like the plugin configuration. When I do that, I immediately synchronize changes back to github so I’m working off the same plugin state in my local editor. The problem is that bubble’s commits delete files that are not part of the original payload - namely I have a test/ directory at root with unit testing files and a .gitignore to ignore node_modules which gets pulled-in by npm install when I’m installing test dependencies (mocha, chai, etc.).

Are there paths or filenaming conventions inside the github repo that bubble’s github integration will leave alone and preserve through synchronization?

Yeah, the process of integrating Github into a plugin workflow is suboptimal.

That said, what I do is create a git submodule (basically, a subrepo) which syncs directly with the “shared” repo (the one Bubble syncs with). There are no “foreign” files in the submodule - only files Bubble has put there. My build process simply outputs the “processed” source files to the appropriate folder/subfolder of the submodule.

It’s a bit of a hoop to jump through and far from ideal, but it works. Perhaps someone else has a better way.

1 Like

That’s likely the best solution, but clunky… Thank You.