diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml index ad5d2c3d..0cee3cf6 100644 --- a/.github/workflows/deployment.yml +++ b/.github/workflows/deployment.yml @@ -40,13 +40,3 @@ jobs: with: user: __token__ password: ${{ secrets.PYPI_API_TOKEN }} - - - name: Slack Notification - uses: homoluctus/slatify@master - if: failure() - with: - type: ${{ job.status }} - job_name: '*Core*' - commit: true - url: ${{ secrets.SLACK_BUILD_WEBHOOK }} - token: ${{ secrets.SLACK_GITHUB_TOKEN }} diff --git a/platformio/account/helpers.py b/platformio/account/helpers.py deleted file mode 100644 index 2f469936..00000000 --- a/platformio/account/helpers.py +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright (c) 2014-present PlatformIO -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import re - -import click - - -def validate_username(value, field="username"): - value = str(value).strip() - if not re.match(r"^[a-z\d](?:[a-z\d]|-(?=[a-z\d])){0,37}$", value, flags=re.I): - raise click.BadParameter( - "Invalid %s format. " - "%s must contain only alphanumeric characters " - "or single hyphens, cannot begin or end with a hyphen, " - "and must not be longer than 38 characters." - % (field.lower(), field.capitalize()) - ) - return value - - -def validate_email(value): - value = str(value).strip() - if not re.match(r"^[a-z\d_.+-]+@[a-z\d\-]+\.[a-z\d\-.]+$", value, flags=re.I): - raise click.BadParameter("Invalid email address") - return value - - -def validate_password(value): - value = str(value).strip() - if not re.match(r"^(?=.*[a-z])(?=.*\d).{8,}$", value): - raise click.BadParameter( - "Invalid password format. " - "Password must contain at least 8 characters" - " including a number and a lowercase letter" - ) - return value - - -def validate_orgname(value): - return validate_username(value, "Organization name")