Skip to content

Commit

Permalink
fixed ci
Browse files Browse the repository at this point in the history
  • Loading branch information
afujiwara-roblox committed Sep 29, 2023
1 parent 5273acc commit 50e36c8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
with:
version: "*"
token: ${{ secrets.GITHUB_TOKEN }}
# allow-external-github-orgs: true
allow-external-github-orgs: true
- run: foreman --version
- run: rojo --version

Expand All @@ -55,6 +55,6 @@ jobs:
version: "*"
token: ${{ secrets.GITHUB_TOKEN }}
working-directory: tests
# allow-external-github-orgs: true
allow-external-github-orgs: true
- run: foreman --version
- run: selene --version
17 changes: 10 additions & 7 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,20 @@ async function run(): Promise<void> {
).toLowerCase();

if (allowExternalGithubOrgs != "true") {
// const repo = new Context();
debug("Checking tools in Foreman Config come from source org");
if (!process.env.GITHUB_REPOSITORY) {
throw new Error(`Could not find repository setup-foreman is running in`);
throw new Error(
`Could not find repository setup-foreman is running in`
);
}
const repository = process.env.GITHUB_REPOSITORY.split('/');
const repository = process.env.GITHUB_REPOSITORY.split("/");
if (repository.length == 0) {
throw new Error(`Could not find owner of repository setup-foreman is running in`)
throw new Error(
`Could not find owner of repository setup-foreman is running in`
);
}
const org = repository[0]
console.log(org);
configFile.checkSameOrgInConfig(org);
const org = repository[0];
configFile.checkSameOrgInConfig(org.toLowerCase());
}

const octokit = new GitHub(githubToken);
Expand Down

0 comments on commit 50e36c8

Please sign in to comment.