Skip to content

Commit 3561947

Browse files
committed
using Default environment variables
1 parent c132b4d commit 3561947

File tree

3 files changed

+3
-12
lines changed

3 files changed

+3
-12
lines changed

action.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,11 @@ inputs:
55
GH_TOKEN:
66
description: "GitHub Token"
77
required: true
8-
9-
REPO_NAME:
10-
description: "Repository Name"
11-
required: true
128

139
PROJECT_ID:
1410
description: "ProjectId"
1511
required: true
1612

17-
PROJECT_NAME:
18-
description: "ProjectName"
19-
required: true
20-
2113
PROJECT_PATH:
2214
description: "ProjectPath"
2315
required: true

src/manager_environment.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@ class EnvironmentManager:
1010
_TRUTHY = ["true", "1", "t", "y", "yes"]
1111

1212
GH_TOKEN = getenv("INPUT_GH_TOKEN")
13-
REPO_NAME = getenv("INPUT_REPO_NAME")
13+
GITHUB_REPOSITORY = getenv("GITHUB_REPOSITORY")
1414
# Google Script
1515
PROJECT_ID = environ["INPUT_PROJECT_ID"]
16-
PROJECT_NAME = environ["INPUT_PROJECT_NAME"]
1716
PROJECT_PATH = environ["INPUT_PROJECT_PATH"]
1817
# Google app
1918
CLIENT_TYPE = environ["INPUT_CLIENT_TYPE"]

src/manager_github.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ def prepare_github_env(cls):
2828
"""
2929
github = Github(EM.GH_TOKEN)
3030
clone_path = "repo"
31-
cls.USER = github.get_user()
31+
# cls.USER = github.get_user()
3232
rmtree(clone_path, ignore_errors=True)
3333

34-
cls._REMOTE_NAME = f"{cls.USER.login}/{EM.REPO_NAME}"
34+
cls._REMOTE_NAME = EM.GITHUB_REPOSITORY
3535
cls._REPO_PATH = f"https://{EM.GH_TOKEN}@github.com/{cls._REMOTE_NAME}.git"
3636

3737
cls.REMOTE = github.get_repo(cls._REMOTE_NAME)

0 commit comments

Comments
 (0)