Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×Hi,
We have created a prehook to match email id of current committer with its email id for previous commits.
Although we can match the full string of both the email id's like below, we want to partially match the email id's.
if (commitDetails.commit.committer.emailAddress != currentUser.emailAddress) {
do something
}
else{
do something
}
Examples of matching email id's partially ::
1. email id1 : user.name@outlook1.com
2. email id2 : user.name@outlook2.com
What we want to do here is matching till user.name@outlook and ignore after that.
We have an option of comparing character by character, but that till trigger for loop for every push, hence causing performance issues.
If there is better way to do from your way, please suggest.