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

Fetch repo-level runner groups from API in v2 flow #3546

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lucavallin
Copy link

@lucavallin lucavallin commented Nov 8, 2024

Fetch repo-level runner groups from API in v2 flow.

@lucavallin lucavallin requested a review from a team as a code owner November 8, 2024 11:48
if (path.Length == 1)
var isOrgRunner = path.Length == 1;
var isRepoOrEnterpriseRunner = path.Length == 2;
var isRepoRunner = !string.Equals(path[0], "enterprises", StringComparison.OrdinalIgnoreCase);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be better to say

var isRepoRunner = isRepoOrEnterpriseRunner && !string.Equals(path[0], "enterprises", StringComparison.OrdinalIgnoreCase);

Otherwise, isRepoRunner would be true even in the org case (may not matter how you're using it, but it'd be good to not have a wrong value if we use it in the future)

if (path.Length == 1)
var isOrgRunner = path.Length == 1;
var isRepoOrEnterpriseRunner = path.Length == 2;
var isRepoRunner = !string.Equals(path[0], "enterprises", StringComparison.OrdinalIgnoreCase);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same logic question here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants