1

I'm developing a Jupyter Book project with my research team on a GitHub repository (I'm a total noob at this but so are they).

Yesterday I came across a few PRs and realized that they all included a '_build' folder in their forks which gets added to the repo when you test jb build MyBook locally on your clone. I'd like to set up a bot, perhaps with GitHub Actions or ProBot that checks this and either removes the folder from their fork (No harm there) or leaves a comment that the folder should be removed before merging. (The book gets built and deployed by a GitHub-actions workflow)

As far as I can tell, bots of this kind can only check for title, body, and comments but not the contents of the fork itself. Are there tools out there to do this? If not so, please point me in some direction so I can further investigate the matter and perhaps create a workflow of my own.

Thanks in advance!

  • 1
    Use a `.gitignore` file to prevent the `_build` folder from being committed to branches. Here is a tutorial: https://www.atlassian.com/git/tutorials/saving-changes/gitignore – peterevans Oct 26 '20 at 05:09

1 Answers1

1

Beside adding a .gitignore, as commented, to incite any contributor to not add a folder, you might consider writing your own GitHub Action in order to reject automatically a PR if the wrong folder is detected.

You can use a GitHub Action like ArangoGutierrez/GoLinty-Action and adapt it in order to check for a folder in the checked out code.
If the test fails, you can then reject the PR.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250