Skip to content

Commit 9848e7c

Browse files
committed
Fixes the GHA
1 parent 40cb405 commit 9848e7c

File tree

2 files changed

+30
-14
lines changed

2 files changed

+30
-14
lines changed

action.yaml

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ inputs:
1414
cache:
1515
description: Cache folder
1616
required: false
17-
default: '/tmp'
17+
default: './cache'
1818
datasources:
1919
description: Custom datasources folder
2020
required: true
@@ -31,25 +31,30 @@ inputs:
3131
runs:
3232
using: 'composite'
3333
steps:
34-
- name: Install GitPortfolio
34+
- name: Clones the latest version of GitPortfolio
35+
uses: actions/checkout@v4
36+
with:
37+
repository: iosifache/gitportfolio
38+
path: ./gitportfolio
39+
- name: Installs GitPortfolio
3540
shell: bash
36-
run: |
37-
pip install githubportfolio
41+
run: pip install ./gitportfolio
3842
- name: Run GitPortfolio
3943
shell: bash
4044
env:
41-
GITHUB_PAT: ${{ github.event.inputs.pat }}
45+
GITHUB_PAT: ${{ inputs.pat }}
4246
run: |
4347
args=()
4448
45-
if [[ "${{ github.event.inputs.update }}" = "true" ]]; then
49+
if [[ "${{ inputs.update }}" = "true" ]]; then
4650
args+=(--update)
4751
fi
4852
49-
gitportfolio \
50-
--config ${{ github.event.inputs.config }} \
51-
--cache ${{ github.event.inputs.cache }} \
52-
--datasources ${{ github.event.inputs.datasources }} \
53-
--template ${{ github.event.inputs.template }} \
54-
--output ${{ github.event.inputs.output }} \
55-
"${args[@]}"
53+
gitportfolio \
54+
--config ${{ inputs.config }} \
55+
--cache ${{ inputs.cache }} \
56+
--datasources ${{ inputs.datasources }} \
57+
--template ${{ inputs.template }} \
58+
--output ${{ inputs.output }} \
59+
"${args[@]}" \
60+
2>/dev/null

gitportfolio/logger.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
import logging
2+
import sys
23

4+
from github import set_log_level as pygithub_set_log_level
35
from rich.logging import RichHandler
46

57
FORMAT = "%(message)s"
68
logging.basicConfig(
7-
level="NOTSET",
9+
level=logging.INFO,
810
format=FORMAT,
911
datefmt="[%X]",
1012
handlers=[RichHandler()],
@@ -17,3 +19,12 @@ def get_logger() -> logging.Logger:
1719

1820
def disable_logger() -> None:
1921
get_logger().propagate = False
22+
23+
logging.disable(sys.maxsize)
24+
logging.getLogger("requests").setLevel(sys.maxsize)
25+
logging.getLogger("requests").propagate = False
26+
logging.getLogger("urllib3").setLevel(sys.maxsize)
27+
logging.getLogger("urllib3").propagate = False
28+
logging.getLogger("requests.packages.urllib3").setLevel(sys.maxsize)
29+
logging.getLogger("requests.packages.urllib3").propagate = False
30+
pygithub_set_log_level(sys.maxsize)

0 commit comments

Comments
 (0)