-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into docs/SK-924
- Loading branch information
Showing
9 changed files
with
101 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: PR Title Check | ||
|
||
on: | ||
pull_request: | ||
types: [opened, edited, reopened, synchronize] | ||
|
||
jobs: | ||
title-check: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Check if PR is internal | ||
id: check_internal | ||
run: | | ||
if [[ "${{ github.event.pull_request.head.repo.full_name }}" == "${{ github.repository }}" ]]; then | ||
echo "internal=true" >> $GITHUB_ENV | ||
else | ||
echo "internal=false" >> $GITHUB_ENV | ||
fi | ||
- name: Run title check script | ||
if: env.internal == 'true' | ||
run: | | ||
pr_title="${{ github.event.pull_request.title }}" | ||
pattern="^(Feature|Fix|Bug|Bugfix|Docs|Refactor|Chore|Github)\/SK-[0-9]+ \| .+" | ||
if [[ ! "$pr_title" =~ $pattern ]]; then | ||
echo "Error: PR title does not follow the required pattern." | ||
echo "Please ensure the title follows the pattern: 'Feature|Fix|Bug|Bugfix|Docs|Refactor|Chore|Github/SK-<numbers> | <Summary>'" | ||
exit 1 | ||
else | ||
echo "PR title is valid." | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,22 @@ | ||
import importlib.metadata | ||
|
||
import click | ||
|
||
CONTEXT_SETTINGS = dict( | ||
# Support -h as a shortcut for --help | ||
help_option_names=["-h", "--help"], | ||
) | ||
|
||
# Dynamically get the version of the package | ||
try: | ||
version = importlib.metadata.version("fedn") | ||
except importlib.metadata.PackageNotFoundError: | ||
version = "unknown" | ||
|
||
|
||
@click.group(context_settings=CONTEXT_SETTINGS) | ||
@click.version_option(version) | ||
@click.pass_context | ||
def main(ctx): | ||
""":param ctx: | ||
""" | ||
""":param ctx:""" | ||
ctx.obj = dict() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters