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

APT-576 adding functionality to check if all orgs are the same in foreman.toml #44

Merged
merged 39 commits into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
24435d6
adding functionality to check if all orgs are the same in foreman.toml
afujiwara-roblox Sep 26, 2023
62407c7
enable flag to allow external github orgs
afujiwara-roblox Sep 26, 2023
689c538
whitelist afujiwara-roblox for CLA bot
afujiwara-roblox Sep 26, 2023
55eca19
removed infinite loop
afujiwara-roblox Sep 26, 2023
7fc3606
typo
afujiwara-roblox Sep 26, 2023
eb6c4ea
updated tests
afujiwara-roblox Sep 27, 2023
ba6fdd5
use find-up library instead of going up parent directories ourselves
afujiwara-roblox Sep 28, 2023
d445654
lint
afujiwara-roblox Sep 28, 2023
adcfcb1
updated import
afujiwara-roblox Sep 28, 2023
7ea2827
updated foremanConfig type definition
afujiwara-roblox Sep 28, 2023
3d08eab
Remove redundant condition main.ts
afujiwara-roblox Sep 29, 2023
ac51b7c
check tool sources come from same org setup-foreman runs in
afujiwara-roblox Sep 29, 2023
daebee8
lint
afujiwara-roblox Sep 29, 2023
4697abe
print owner
afujiwara-roblox Sep 29, 2023
e222860
print owner
afujiwara-roblox Sep 29, 2023
f8060a3
print repo
afujiwara-roblox Sep 29, 2023
835e0cc
print repo
afujiwara-roblox Sep 29, 2023
5273acc
lint
afujiwara-roblox Sep 29, 2023
50e36c8
fixed ci
afujiwara-roblox Sep 29, 2023
3f24462
better error message for org not found
afujiwara-roblox Sep 29, 2023
a56fd9f
style and added test
afujiwara-roblox Oct 2, 2023
83d8a1b
continue on error expecting an error
afujiwara-roblox Oct 2, 2023
a5ad851
add failure on success to exepcted failure test case
afujiwara-roblox Oct 2, 2023
421e4cb
fail on success, succeed on failure
afujiwara-roblox Oct 2, 2023
237aa9f
continue on error
afujiwara-roblox Oct 2, 2023
2657c20
test fail case
afujiwara-roblox Oct 2, 2023
671140f
typo
afujiwara-roblox Oct 2, 2023
9971f2f
added id
afujiwara-roblox Oct 2, 2023
d959832
typo
afujiwara-roblox Oct 2, 2023
437c835
test success case
afujiwara-roblox Oct 2, 2023
1f5147c
add test to check same org success
afujiwara-roblox Oct 2, 2023
3c12b46
added all files
afujiwara-roblox Oct 2, 2023
5253048
fix org comparison
afujiwara-roblox Oct 2, 2023
00b0f7a
print org
afujiwara-roblox Oct 2, 2023
d3d58f6
print dirname
afujiwara-roblox Oct 2, 2023
046a993
change directory before checking for foreman config
afujiwara-roblox Oct 2, 2023
714bec1
changed tools for testing
afujiwara-roblox Oct 2, 2023
4f326f0
readd explicit null checks
afujiwara-roblox Oct 3, 2023
b6d8c39
updated readme to include 'allow-external-github-orgs' parameter
afujiwara-roblox Oct 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/clabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
call-clabot-workflow:
uses: Roblox/cla-signature-bot/.github/workflows/clabot-workflow.yml@master
with:
whitelist: "LPGhatguy,ZoteTheMighty,cliffchapmanrbx,MagiMaster,MisterUncloaked,amatosov-rbx,dependabot[bot]"
whitelist: "LPGhatguy,ZoteTheMighty,cliffchapmanrbx,MagiMaster,MisterUncloaked,amatosov-rbx,dependabot[bot],afujiwara-roblox"
use-remote-repo: true
remote-repo-name: "roblox/cla-bot-store"
secrets: inherit
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
with:
version: "*"
token: ${{ secrets.GITHUB_TOKEN }}
allow-external-github-orgs: true
- run: foreman --version
- run: rojo --version

Expand All @@ -54,5 +55,6 @@ jobs:
version: "*"
token: ${{ secrets.GITHUB_TOKEN }}
working-directory: tests
allow-external-github-orgs: true
afujiwara-roblox marked this conversation as resolved.
Show resolved Hide resolved
- run: foreman --version
- run: selene --version
24 changes: 24 additions & 0 deletions __tests__/hello.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
// who needs tests?
afujiwara-roblox marked this conversation as resolved.
Show resolved Hide resolved
import configFile from "../src/configFile";
import {parse} from "toml";

test("get off my back, Jest", () => {
expect(5).toEqual(5);
});

test("checkSameOrgToolSpec same org", () => {
let config = `
[tools]\n
tool1 = { source = "org1/tool1", version = "1.0.0" }\n
tool2 = { source = "org1/tool2", version = "1.0.0" }\n
tool3 = { source = "org1/tool3", version = "1.0.0" }\n
`;
let manifestContent = parse(config);
expect(configFile.checkSameOrgToolSpecs(manifestContent)).toEqual(true);
});

test("checkSameOrgToolSpec different org", () => {
let config = `
[tools]\n
tool1 = { source = "org1/tool1", version = "1.0.0" }\n
tool2 = { source = "org2/tool2", version = "1.0.0" }\n
tool3 = { source = "org1/tool3", version = "1.0.0" }\n
`;
let manifestContent = parse(config);
expect(configFile.checkSameOrgToolSpecs(manifestContent)).toEqual(false);
});
Loading
Loading