Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT]: Read x-oauth-scopes returned from the API #1553

Open
1 task done
yeikel opened this issue Mar 17, 2023 · 1 comment
Open
1 task done

[FEAT]: Read x-oauth-scopes returned from the API #1553

yeikel opened this issue Mar 17, 2023 · 1 comment
Labels
hacktoberfest Issues for participation in Hacktoberfest Status: Up for grabs Issues that are ready to be worked on by anyone Type: Feature New feature or request

Comments

@yeikel
Copy link
Contributor

yeikel commented Mar 17, 2023

Describe the need

I would like to read x-oauth-scopes returned from the API headers to make decisions

I could not find any native method to do this with octokit but I could be wrong

I am currently implementing it with the following snippet :

response = HTTParty.get(
  "https://#{ENV['GITHUB_ENTERPRISE_HOSTNAME']}/api/v3/user",
  :headers => {
    "Authorization" => "Bearer #{ENV["GITHUB_ENTERPRISE_ACCESS_TOKEN"]}"
  })

scopes = response.headers['x-oauth-scopes']

SDK Version

No response

API Version

No response

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@yeikel yeikel added Status: Triage This is being looked at and prioritized Type: Feature New feature or request labels Mar 17, 2023
@nickfloyd nickfloyd added Status: Up for grabs Issues that are ready to be worked on by anyone and removed Status: Triage This is being looked at and prioritized labels Mar 17, 2023
@nickfloyd
Copy link
Contributor

Hey, @yeikel, thanks for highlighting this. It seems like it would be a nice addition. Is this something you'd be up for giving a shot at making a PR for? I'll add the "up for grabs" label on this and put it in the backlog so we can prioritize it. Thanks again for the idea/suggestion. ❤

@nickfloyd nickfloyd added the hacktoberfest Issues for participation in Hacktoberfest label Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest Issues for participation in Hacktoberfest Status: Up for grabs Issues that are ready to be worked on by anyone Type: Feature New feature or request
Projects
Status: 🔥 Backlog
Development

No branches or pull requests

2 participants