Skip to content
Open
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
7 changes: 3 additions & 4 deletions ci/bitbucket/changed_files.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import os
import requests
from security import safe_requests

BITBUCKET_ACCESS_TOKEN = os.environ.get("BITBUCKET_ACCESS_TOKEN_PIXEE")
BITBUCKET_REPO_SLUG = os.environ.get("BITBUCKET_REPO_SLUG")
Expand All @@ -16,13 +16,12 @@
}

# Make the first API call to get the diffstat URL
response = requests.get(url, headers=headers, timeout=10)
response = safe_requests.get(url, headers=headers, timeout=10)
data = response.json()
diffstat_url = data["links"]["diffstat"]["href"]

# Make the second API call using the diffstat URL
diffstat_response = requests.get(
f"{diffstat_url}&fields=values.new.path", headers=headers, timeout=10
diffstat_response = safe_requests.get(f"{diffstat_url}&fields=values.new.path", headers=headers, timeout=10
)
diffstat_data = diffstat_response.json()

Expand Down
1 change: 1 addition & 0 deletions ci/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
python-gitlab
whatthepatch
security==1.3.0
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This library holds security tools for protecting Python API calls.

License: MITOpen SourceMore facts