Skip to content

Commit

Permalink
refactor: rename github_action to github_actions (#588)
Browse files Browse the repository at this point in the history
  • Loading branch information
jd authored Jan 3, 2025
1 parent 7e5fa8b commit c0982f4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
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

0 comments on commit c0982f4

Please sign in to comment.