Skip to content

Commit b85b91b

Browse files
fix: api call (#15)
Octokit changes how to grab the results.
1 parent 066b34c commit b85b91b

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

.github/workflows/test.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,23 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v2
1515
- uses: ./
16-
id: is_organization_member
16+
id: is_organization_member_zendesk
17+
with:
18+
organization: zendesk
19+
username: JamesSingleton
20+
token: ${{ secrets.GITHUB_TOKEN }}
21+
- name: Log Result
22+
run: |
23+
result=${{steps.is_organization_member_zendesk.outputs.result}}
24+
echo "$result"
25+
- uses: actions/checkout@v2
26+
- uses: ./
27+
id: is_organization_member_amex
1728
with:
1829
organization: americanexpress
1930
username: JamesSingleton
2031
token: ${{ secrets.GITHUB_TOKEN }}
2132
- name: Log Result
2233
run: |
23-
result=${{steps.is_organization_member.outputs.result}}
34+
result=${{steps.is_organization_member_amex.outputs.result}}
2435
echo "$result"

dist/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ main();
171171

172172
async function main() {
173173
const { data: orgs } = checkStatus(
174-
await octokit.orgs.listForUser({ username, per_page: 100 })
174+
await octokit.rest.orgs.listForUser({ username, per_page: 100 })
175175
);
176176

177177
const isMember = orgs.some(({ login }) => login === organization);

src/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ main();
1616

1717
async function main() {
1818
const { data: orgs } = checkStatus(
19-
await octokit.orgs.listForUser({ username, per_page: 100 })
19+
await octokit.rest.orgs.listForUser({ username, per_page: 100 })
2020
);
2121

2222
const isMember = orgs.some(({ login }) => login === organization);

0 commit comments

Comments
 (0)