cburstedde / p4est

The "p4est" forest-of-octrees library
www.p4est.org/
GNU General Public License v2.0
253 stars 114 forks source link

CI for checking if PR changes submodule #287

Open mkirilin opened 7 months ago

mkirilin commented 7 months ago

This CI runs on pull request and checks whether the PR attempts to change reference to sc submodule. If so, it exiting with error, turns a PR into a draft PR, and leaves a comment:

"Submodule has been changed by this PR. This is forbidden by the repository policy. Your PR is turned into a draft PR."

Otherwise, it exits with success and does nothing.

cburstedde commented 6 months ago

Thanks; there may be a simpler way without checking out the submodules.

mkirilin commented 5 months ago

UPD: I've simplified the code by checking out the base repository's branch initially without. Fetching is no need anymore.