Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: rename github_action to github_actions #588

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions mergify_cli/ci/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@
)


CIProviderT = typing.Literal["github_action", "circleci"]
CIProviderT = typing.Literal["github_actions", "circleci"]


def get_ci_provider() -> CIProviderT | None:
if os.getenv("GITHUB_ACTIONS") == "true":
return "github_action"
return "github_actions"
if os.getenv("CIRCLECI") == "true":
return "circleci"
return None


def get_job_name() -> str | None:
if get_ci_provider() == "github_action":
if get_ci_provider() == "github_actions":
return os.getenv("GITHUB_WORKFLOW")
if get_ci_provider() == "circleci":
return os.getenv("CIRCLE_JOB")
Expand Down Expand Up @@ -77,7 +77,7 @@ async def get_circle_ci_head_sha() -> str | None:


async def get_head_sha() -> str | None:
if get_ci_provider() == "github_action":
if get_ci_provider() == "github_actions":
return get_github_actions_head_sha()
if get_ci_provider() == "circleci":
return await get_circle_ci_head_sha()
Expand All @@ -87,7 +87,7 @@ async def get_head_sha() -> str | None:


def get_github_repository() -> str | None:
if get_ci_provider() == "github_action":
if get_ci_provider() == "github_actions":
return os.getenv("GITHUB_REPOSITORY")
if get_ci_provider() == "circleci":
repository_url = os.getenv("CIRCLE_REPOSITORY_URL")
Expand Down
2 changes: 1 addition & 1 deletion mergify_cli/tests/ci_issues/test_junit_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"GITHUB_SHA": "3af96aa24f1d32fcfbb7067793cacc6dc0c6b199",
"GITHUB_WORKFLOW": "JOB",
},
"github_action",
"github_actions",
),
(
{
Expand Down