mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-31 02:27:13 +02:00
Cleanup
This commit is contained in:
10
.github/workflows/deployment.yml
vendored
10
.github/workflows/deployment.yml
vendored
@ -40,13 +40,3 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
user: __token__
|
user: __token__
|
||||||
password: ${{ secrets.PYPI_API_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 }}
|
|
||||||
|
@ -1,52 +0,0 @@
|
|||||||
# Copyright (c) 2014-present PlatformIO <contact@platformio.org>
|
|
||||||
#
|
|
||||||
# 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")
|
|
Reference in New Issue
Block a user