Skip to content

Conversation

@LonMcGregor
Copy link
Collaborator

@LonMcGregor LonMcGregor commented Dec 10, 2025

Adds a file validator for PR submissions.

The directory files should be changed in is defined in an issue body, in a comment, like so:

<!---
CHANGE_DIR=^Sprint-1/
--->
  • If it is not present, the bot does not do this check

  • If it is present, this regexp is checked against every changed file present in a PR submission

  • If any fail to match, i.e. something in a wrong directory was changed, then the bot issues a warning

  • If no files are submitted at all, the bot issues a warning

  • I propose any metadata that needs checked be included in these style of comments, and this metadata will need to be added for every task submission before the bot will be able to perform checks

  • Currently only supports checking a single directory, but could be extended to have multiple, could also extend to do things like checking max number of committed files or any other metadata visible to PRs

You can see an example of output of this check here: CodeYourFuture/Module-Structuring-and-Testing-Data#873

@LonMcGregor LonMcGregor marked this pull request as ready for review December 10, 2025 16:02
@LonMcGregor
Copy link
Collaborator Author

@illicitonion Here is the validator for checking the right files are committed. Let me know what you think, in particular if I've made any faux-pas in rust, re the matching and error handling. I'm still getting used to that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants