Closed johnament closed 7 months ago
👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labled with Status: Up for grabs
. You & others like you are the reason all of this works! So thank you & happy coding! 🚀
I can't reproduce the issue
const { Octokit } = require("octokit")
const octokit = new Octokit({
auth: "<token>"
});
async function main() {
const data = await octokit.rest.teams.getByName({
org: "octokit",
team_slug: "maintainers",
});
console.log(data);
}
main();
Should octokit/maintainers work for me (as someone not a member of your org)?
No, it only works for members of the org. You can change the values of org
and team_slug
as needed.
So I retested with yours and confirmed that i pulled in 3.1.2 of octokit, and that worked. I noticed that where I was running the original test was on 2.1.0 of octokit (not latest as I had assumed). I can upgrade that and see if that resolves this issue.
Glad to hear that it is now working 👍
What happened?
There exists an API call Get A Team by Name: https://docs.github.com/en/rest/teams/teams?apiVersion=2022-11-28#get-a-team-by-name Following code examples (https://octokit.github.io/rest.js/v20#teams scroll to getByName), I should be able to call it like:
However that does not return any teams.
When I call it the way described in the API, or via curl it works fine with the same params
Versions
Node v20.9.0 Octokit: latest available
Relevant log output
No response
Code of Conduct