Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a student id check #24

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Add a student id check #24

wants to merge 3 commits into from

Conversation

w-lfchen
Copy link
Member

This pr aims to add a method to the build tasks that tries to catch students who enter their matriculation number in the studentId field, fail the build and inform them about their mistake.

@Rdeisenroth
Copy link
Member

Hmm could we not go for a more exact regex, like [a-z]{2}\d{2}[a-z]{4}?

See https://regex101.com/r/p0Irh8/1

@w-lfchen
Copy link
Member Author

The initial point of this was to simply ensure that no matriculation numbers are entered. I'm not opposed to updating it, but is there a guarantee that all TU-IDs have this format?

@alexstaeding
Copy link
Member

alexstaeding commented Jun 26, 2024

A more specific regex would be incorrect. I have seen valid TU-IDs with only one letter (some old ones).

The only commonality I have found is that they all have at least one letter, and this simple check is enough to prevent using the matriculation number instead.

Copy link
Member

@alexstaeding alexstaeding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but I would still like to test it first before merging

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.

3 participants