Skip to content

Commit

Permalink
Change: Improve secret scanning API usage examples
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoernricks committed Oct 10, 2023
1 parent 32734df commit 17d8436
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions pontos/github/api/secret_scanning.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ async def organization_alerts(
async with GitHubAsyncRESTApi(token) as api:
async for alert in api.secret_scanning.organization_alerts(
"my-enterprise"
"my-org"
):
print(alert)
"""
Expand Down Expand Up @@ -202,7 +202,7 @@ async def alerts(
async with GitHubAsyncRESTApi(token) as api:
async for alert in api.secret_scanning.alerts(
"my-enterprise"
"my-org/my-repo"
):
print(alert)
"""
Expand Down Expand Up @@ -288,12 +288,18 @@ async def update_alert(
.. code-block:: python
from pontos.github.api import GitHubAsyncRESTApi
from pontos.github.models.secret_scanning import (
AlertState,
Resolution,
)
async with GitHubAsyncRESTApi(token) as api:
alert = await api.dependabot.update(
alert = await api.secret_scanning.update_alert(
"foo/bar",
123,
AlertState.RESOLVED,
resolution=Resolution.WONT_FIX,
resolution_comment="Not applicable",
)
"""
api = f"/repos/{repo}/secret-scanning/alerts/{alert_number}"
Expand Down

0 comments on commit 17d8436

Please sign in to comment.