-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49 from psadi/feature/functools_optz
refactor(bb:pr,repo,auth): functool wraps to error_handler
- Loading branch information
Showing
16 changed files
with
402 additions
and
235 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 |
---|---|---|
@@ -1,3 +1,22 @@ | ||
############################################################################ | ||
# Bitbucket CLI (bb): Work seamlessly with Bitbucket from the command line | ||
# | ||
# Copyright (C) 2022 P S, Adithya (psadi) ([email protected]) | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU Affero General Public License as | ||
# published by the Free Software Foundation, either version 3 of the | ||
# License, or (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU Affero General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Affero General Public License | ||
# along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
############################################################################ | ||
|
||
name: Continuous Integration | ||
|
||
on: | ||
|
@@ -106,8 +125,6 @@ jobs: | |
name: Build, Scan & Push Docker image to Docker Hub | ||
runs-on: ubuntu-latest | ||
needs: "build" | ||
env: | ||
tag: | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
|
@@ -127,17 +144,17 @@ jobs: | |
uses: aquasecurity/[email protected] | ||
with: | ||
image-ref: docker.io/psadi/bbcli:${{ github.event_name == 'release' && steps.meta.outputs.tags || github.sha }} | ||
format: 'sarif' | ||
output: 'trivy-results.sarif' | ||
exit-code: '1' | ||
format: "sarif" | ||
output: "trivy-results.sarif" | ||
exit-code: "1" | ||
ignore-unfixed: true | ||
vuln-type: 'os,library' | ||
severity: 'CRITICAL,HIGH' | ||
vuln-type: "os,library" | ||
severity: "CRITICAL,HIGH" | ||
|
||
- name: Upload Trivy scan results to GitHub Security tab | ||
uses: github/codeql-action/upload-sarif@v3 | ||
with: | ||
sarif_file: 'trivy-results.sarif' | ||
sarif_file: "trivy-results.sarif" | ||
|
||
- name: Push Docker Image | ||
if: ${{ github.event_name == 'release' }} | ||
|
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,3 +1,22 @@ | ||
############################################################################ | ||
# Bitbucket CLI (bb): Work seamlessly with Bitbucket from the command line | ||
# | ||
# Copyright (C) 2022 P S, Adithya (psadi) ([email protected]) | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU Affero General Public License as | ||
# published by the Free Software Foundation, either version 3 of the | ||
# License, or (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU Affero General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Affero General Public License | ||
# along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
############################################################################ | ||
|
||
name: Update dependencies | ||
|
||
on: | ||
|
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,3 +1,22 @@ | ||
############################################################################ | ||
# Bitbucket CLI (bb): Work seamlessly with Bitbucket from the command line | ||
# | ||
# Copyright (C) 2022 P S, Adithya (psadi) ([email protected]) | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU Affero General Public License as | ||
# published by the Free Software Foundation, either version 3 of the | ||
# License, or (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU Affero General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Affero General Public License | ||
# along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
############################################################################ | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
|
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,3 +1,22 @@ | ||
############################################################################ | ||
# Bitbucket CLI (bb): Work seamlessly with Bitbucket from the command line | ||
# | ||
# Copyright (C) 2022 P S, Adithya (psadi) ([email protected]) | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU Affero General Public License as | ||
# published by the Free Software Foundation, either version 3 of the | ||
# License, or (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU Affero General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Affero General Public License | ||
# along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
############################################################################ | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
|
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,5 +1,27 @@ | ||
// ############################################################################ | ||
// # Bitbucket CLI (bb): Work seamlessly with Bitbucket from the command line | ||
// # | ||
// # Copyright (C) 2022 P S, Adithya (psadi) ([email protected]) | ||
// # | ||
// # This program is free software: you can redistribute it and/or modify | ||
// # it under the terms of the GNU Affero General Public License as | ||
// # published by the Free Software Foundation, either version 3 of the | ||
// # License, or (at your option) any later version. | ||
// # | ||
// # This program is distributed in the hope that it will be useful, | ||
// # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// # GNU Affero General Public License for more details. | ||
// # | ||
// # You should have received a copy of the GNU Affero General Public License | ||
// # along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
// ############################################################################ | ||
{ | ||
"python.autoComplete.extraPaths": ["__pypackages__/3.12/lib"], | ||
"python.analysis.extraPaths": ["__pypackages__/3.12/lib"], | ||
"python.analysis.typeCheckingMode": "off" | ||
"python.autoComplete.extraPaths": [ | ||
"__pypackages__/3.12/lib" | ||
], | ||
"python.analysis.extraPaths": [ | ||
"__pypackages__/3.12/lib" | ||
], | ||
"python.analysis.typeCheckingMode": "basic" | ||
} |
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,3 +1,22 @@ | ||
############################################################################ | ||
# Bitbucket CLI (bb): Work seamlessly with Bitbucket from the command line | ||
# | ||
# Copyright (C) 2022 P S, Adithya (psadi) ([email protected]) | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU Affero General Public License as | ||
# published by the Free Software Foundation, either version 3 of the | ||
# License, or (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU Affero General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Affero General Public License | ||
# along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
############################################################################ | ||
|
||
FROM python:3.13.0b3-alpine | ||
|
||
COPY dist/bb-*.tar.gz bb.tar.gz | ||
|
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 |
---|---|---|
|
@@ -51,14 +51,14 @@ def version_callback(value: bool) -> None: | |
def setup() -> typer.Typer: | ||
_bb = typer.Typer( | ||
add_completion=False, | ||
epilog="Source Code: https://github.com/psadi/bbcli", | ||
help="Work seamlessly with Bitbucket from the command line.", | ||
epilog="Author: P S, Adithya (psadi) <[email protected]>\n\nProject URL: https://github.com/psadi/bbcli\n\n\nLicense: GNU Affero General Public License v3.0 (AGPLv3) <https://github.com/psadi/bbcli/blob/main/LICENSE>", | ||
help="Work seamlessly with Bitbucket from the command line", | ||
no_args_is_help=True, | ||
) | ||
|
||
_bb.add_typer(_pr, name="pr", help="Manage pull requests") | ||
_bb.add_typer(_auth, name="auth", help="Authenticate bb and git with Bitbucket") | ||
_bb.add_typer(_repo, name="repo", help="Work with BitBucket repositories") | ||
_bb.add_typer(_pr, name="pr", help="manage pull requests") | ||
_bb.add_typer(_auth, name="auth", help="authenticate bb and git with bitbucket") | ||
_bb.add_typer(_repo, name="repo", help="work with bitBucket repositories") | ||
|
||
return _bb | ||
|
||
|
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
Oops, something went wrong.