Skip to content

Commit 84fee7a

Browse files
committed
Use user-provided endpoint
1 parent 83d9668 commit 84fee7a

File tree

4 files changed

+4
-21
lines changed

4 files changed

+4
-21
lines changed

badges/coverage.svg

Lines changed: 1 addition & 1 deletion
Loading

dist/index.js

Lines changed: 1 addition & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,7 @@ export async function run(): Promise<void> {
2323
throw new Error('GITHUB_TOKEN is not set')
2424
}
2525

26-
let endpoint = core.getInput('endpoint')
27-
28-
// If we're in an org-owned repository, we should use the org-owned endpoint
29-
const repoOwner = process.env.GITHUB_REPOSITORY_OWNER
30-
const ownerType = process.env.GITHUB_REPOSITORY_OWNER_TYPE
31-
if (
32-
endpoint == 'https://models.github.ai/inference' &&
33-
ownerType == 'Organization'
34-
) {
35-
endpoint = `https://models.github.ai/${repoOwner}/inference`
36-
}
26+
const endpoint = core.getInput('endpoint')
3727

3828
const client = ModelClient(endpoint, new AzureKeyCredential(token))
3929

0 commit comments

Comments
 (0)