Skip to content

Commit

Permalink
fix: github action names missing github in name
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgrittner committed Oct 13, 2024
1 parent ad78ff4 commit 958b58d
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 39 deletions.
16 changes: 8 additions & 8 deletions admyral/actions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@
list_groups_per_user,
list_1password_audit_events,
search_github_enterprise_audit_logs,
list_merged_pull_requests,
list_commit_history_for_pull_request,
list_review_history_for_pull_request,
list_github_merged_pull_requests,
list_github_commit_history_for_pull_request,
list_github_review_history_for_pull_request,
compare_two_github_commits,
list_merged_pull_requests_without_approval,
list_github_merged_pull_requests_without_approval,
list_google_docs_revisions,
list_ms_intune_unencrypted_managed_devices,
list_ms_intune_managed_devices,
Expand Down Expand Up @@ -131,10 +131,10 @@
"okta_get_all_user_types",
"get_okta_logs",
"search_github_enterprise_audit_logs",
"list_merged_pull_requests",
"list_commit_history_for_pull_request",
"list_review_history_for_pull_request",
"list_merged_pull_requests_without_approval",
"list_github_merged_pull_requests",
"list_github_commit_history_for_pull_request",
"list_github_review_history_for_pull_request",
"list_github_merged_pull_requests_without_approval",
"compare_two_github_commits",
"abuseipdb_analyze_ip",
"steampipe_query_aws",
Expand Down
16 changes: 8 additions & 8 deletions admyral/actions/integrations/compliance/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
)
from admyral.actions.integrations.compliance.github import (
search_github_enterprise_audit_logs,
list_merged_pull_requests,
list_commit_history_for_pull_request,
list_review_history_for_pull_request,
list_github_merged_pull_requests,
list_github_commit_history_for_pull_request,
list_github_review_history_for_pull_request,
compare_two_github_commits,
list_merged_pull_requests_without_approval,
list_github_merged_pull_requests_without_approval,
)
from admyral.actions.integrations.compliance.google_drive import (
list_google_docs_revisions,
Expand All @@ -26,11 +26,11 @@
"list_groups_per_user",
"list_1password_audit_events",
"search_github_enterprise_audit_logs",
"list_merged_pull_requests",
"list_commit_history_for_pull_request",
"list_review_history_for_pull_request",
"list_github_merged_pull_requests",
"list_github_commit_history_for_pull_request",
"list_github_review_history_for_pull_request",
"compare_two_github_commits",
"list_merged_pull_requests_without_approval",
"list_github_merged_pull_requests_without_approval",
"list_google_docs_revisions",
"list_ms_intune_managed_devices",
"list_ms_intune_unencrypted_managed_devices",
Expand Down
14 changes: 7 additions & 7 deletions admyral/actions/integrations/compliance/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def compare_two_github_commits(
description="List all merged pull requests for a repository.",
secrets_placeholders=["GITHUB_SECRET"],
)
def list_merged_pull_requests(
def list_github_merged_pull_requests(
repo_owner: Annotated[
str,
ArgumentMetadata(
Expand Down Expand Up @@ -298,7 +298,7 @@ def list_merged_pull_requests(
description="List commit history for a Pull Request from most recent to oldest",
secrets_placeholders=["GITHUB_SECRET"],
)
def list_commit_history_for_pull_request(
def list_github_commit_history_for_pull_request(
repo_owner: Annotated[
str,
ArgumentMetadata(
Expand Down Expand Up @@ -341,7 +341,7 @@ def list_commit_history_for_pull_request(
description="List approval history for a Pull Request",
secrets_placeholders=["GITHUB_SECRET"],
)
def list_review_history_for_pull_request(
def list_github_review_history_for_pull_request(
repo_owner: Annotated[
str,
ArgumentMetadata(
Expand Down Expand Up @@ -401,7 +401,7 @@ def list_review_history_for_pull_request(
description="List all pull requests of a repository that contain unapproved commits, i.e., PRs which were never approved or commits after an approval.",
secrets_placeholders=["GITHUB_SECRET"],
)
def list_merged_pull_requests_without_approval(
def list_github_merged_pull_requests_without_approval(
repo_owner: Annotated[
str,
ArgumentMetadata(
Expand Down Expand Up @@ -431,7 +431,7 @@ def list_merged_pull_requests_without_approval(
),
] = None,
) -> list[dict[str, JsonValue]]:
merged_prs = list_merged_pull_requests(
merged_prs = list_github_merged_pull_requests(
repo_owner=repo_owner,
repo_name=repo_name,
start_time=start_time,
Expand All @@ -440,7 +440,7 @@ def list_merged_pull_requests_without_approval(

unreviewed_prs = []
for pr in merged_prs:
commit_history = list_commit_history_for_pull_request(
commit_history = list_github_commit_history_for_pull_request(
repo_owner=repo_owner, repo_name=repo_name, pull_request_number=pr["number"]
)
if is_empty(commit_history):
Expand All @@ -455,7 +455,7 @@ def list_merged_pull_requests_without_approval(
last_commit_id = last_commit["sha"]

# Identify the last approved commit
approval_history = list_review_history_for_pull_request(
approval_history = list_github_review_history_for_pull_request(
repo_owner=repo_owner,
repo_name=repo_name,
pull_request_number=pr["number"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Alternatively, for a Token (classic):
**SDK Import:**

```python
from admyral.actions import list_merged_pull_requests
from admyral.actions import list_github_merged_pull_requests
```

## Arguments
Expand All @@ -51,7 +51,7 @@ A JSON array of commits.
## SDK Example

```python
commit_diff = list_commit_history_for_pull_request(
commit_diff = list_github_commit_history_for_pull_request(
repo_owner="admyral",
repo_name="admyral",
pull_request_number="3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Alternatively, for a Token (classic):
**SDK Import:**

```python
from admyral.actions import list_merged_pull_requests
from admyral.actions import list_github_merged_pull_requests
```

## Arguments
Expand All @@ -52,7 +52,7 @@ A JSON array of merged pull requests.
## SDK Example

```python
commit_diff = list_merged_pull_requests(
commit_diff = list_github_merged_pull_requests(
repo_owner="admyral",
repo_name="admyral",
secrets={"GITHUB_SECRET": "your_github_secret"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Alternatively, for a Token (classic):
**SDK Import:**

```python
from admyral.actions import list_merged_pull_requests_without_approval
from admyral.actions import list_github_merged_pull_requests_without_approval
```

## Arguments
Expand Down Expand Up @@ -52,7 +52,7 @@ A JSON array of pull request information. Each pull request contains the followi
## SDK Example

```python
audit_log_entries = list_merged_pull_requests_without_approval(
audit_log_entries = list_github_merged_pull_requests_without_approval(
repo_owner="Admyral-Security",
repo_name="admyral",
secrets={"GITHUB_SECRET": "my_github_secret"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Alternatively, for a Token (classic):
**SDK Import:**

```python
from admyral.actions import list_review_history_for_pull_request
from admyral.actions import list_github_review_history_for_pull_request
```

## Arguments
Expand All @@ -52,7 +52,7 @@ A JSON array of reviews.
## SDK Example

```python
commit_diff = list_review_history_for_pull_request(
commit_diff = list_github_review_history_for_pull_request(
repo_owner="admyral",
repo_name="admyral",
pull_request_number="3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
from admyral.typings import JsonValue
from admyral.action import action, ArgumentMetadata
from admyral.actions import (
list_commit_history_for_pull_request,
list_review_history_for_pull_request,
list_github_commit_history_for_pull_request,
list_github_review_history_for_pull_request,
send_slack_message_to_user_by_email,
send_slack_message,
create_jira_issue,
Expand Down Expand Up @@ -52,7 +52,7 @@ def has_pr_unreviewed_commits(
ArgumentMetadata(display_name="State", description="The state of the review"),
] = "APPROVED",
) -> dict[str, JsonValue]:
commit_history = list_commit_history_for_pull_request(
commit_history = list_github_commit_history_for_pull_request(
repo_owner=repo_owner,
repo_name=repo_name,
pull_request_number=pull_request["number"],
Expand All @@ -70,7 +70,7 @@ def has_pr_unreviewed_commits(
last_commit_id = last_commit["sha"]

# Identify the last approved commit
approval_history = list_review_history_for_pull_request(
approval_history = list_github_review_history_for_pull_request(
repo_owner=repo_owner,
repo_name=repo_name,
pull_request_number=pull_request["number"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from admyral.workflow import workflow, Schedule
from admyral.typings import JsonValue
from admyral.action import action, ArgumentMetadata
from admyral.actions import list_merged_pull_requests
from admyral.actions import list_github_merged_pull_requests


@action(
Expand Down Expand Up @@ -74,7 +74,7 @@ def check_pull_requests_for_unreviewed_merged_commits(
def github_unreviewed_commits_are_merged(payload: dict[str, JsonValue]):
start_end_end_time = get_time_range_of_last_full_hour()

merged_prs = list_merged_pull_requests(
merged_prs = list_github_merged_pull_requests(
repo_owner="admyral", # TODO: set repo owner
repo_name="admyral", # TODO: set repo name
start_time=start_end_end_time[0],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from admyral.workflow import workflow, Schedule
from admyral.typings import JsonValue
from admyral.actions import (
list_merged_pull_requests_without_approval,
list_github_merged_pull_requests_without_approval,
get_time_interval_of_last_n_days,
send_slack_message,
format_json_to_list_view_string,
Expand All @@ -15,7 +15,7 @@
def monitor_merged_github_prs_without_approval(payload: dict[str, JsonValue]):
last_day_time_interval = get_time_interval_of_last_n_days(n_days=1)

unreviewed_prs = list_merged_pull_requests_without_approval(
unreviewed_prs = list_github_merged_pull_requests_without_approval(
repo_owner="Admyral-Security", # TODO: set your repo owner here
repo_name="Admyral_Github_Integration_Test", # TODO: set your repo name here
start_time=last_day_time_interval[0],
Expand Down

0 comments on commit 958b58d

Please sign in to comment.