Skip to content

SUP-1820-fix bitsight headers#588

Merged
effany merged 1 commit intomainfrom
SUP-1820-fix-bitsight-task
Jun 27, 2025
Merged

SUP-1820-fix bitsight headers#588
effany merged 1 commit intomainfrom
SUP-1820-fix-bitsight-task

Conversation

@effany
Copy link
Copy Markdown
Contributor

@effany effany commented Jun 27, 2025

bitsight toolkit tasks is failing for faraday upgrade because http_get methods needs to have valid headers being passed in.

def my_company
# First get my company
response = http_get("https://#{@bitsight_api_key}:@api.bitsighttech.com/portfolio", {})
portfolio = JSON.parse(response.body)
@companies = portfolio["companies"]
@company_guid = portfolio["my_company"]["guid"]
end

changed the line

response = http_get("https://#{@bitsight_api_key}:@api.bitsighttech.com/portfolio", {})

to

response = http_get("https://#{@bitsight_api_key}:@api.bitsighttech.com/portfolio", @headers)

@jesutorrr
Copy link
Copy Markdown
Contributor

Looks good to me.
Good catch on the http_get needing valid headers

@jesutorrr jesutorrr requested a review from abhiuee June 27, 2025 15:19
@effany effany requested review from jesutorrr and removed request for abhiuee June 27, 2025 15:22
Copy link
Copy Markdown
Contributor

@jesutorrr jesutorrr left a comment

Choose a reason for hiding this comment

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

LGTM

@effany effany merged commit b096f93 into main Jun 27, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants