Skip to content

Conversation

@technicalpickles
Copy link
Contributor

I work on lots of codebases aside from ones with code_ownership, and I find it a little annoying to see "Owner: error!" when it isn't expected to work at all.

This adds a concept of checking that a workspace is configured for codeowners, or not. When it's not configured, it shows that with an info icon:

CleanShot 2024-11-26 at 12 12 51

Unrelated, but I fixed an error I was getting while using the debugging, which fixes an infinite recursion. I assume it is either debug/dev specific, or we'd see it more.

@technicalpickles technicalpickles requested a review from a team November 26, 2024 17:22
Copy link

@lalunamel lalunamel left a comment

Choose a reason for hiding this comment

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

Quick access to the owning team's config file. Clicking on the status bar item will open a popup that includes a button that opens the team's config file. See [Code Teams](https://github.com/rubyatscale/code_teams) for more information on team config files.

## Installation

Choose a reason for hiding this comment

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

:shipit:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Prettier did this on its own 🤷🏻

Comment on lines +279 to +295
private async checkConfiguration(): Promise<void> {
const binaryPath = resolve(this.workspace.uri.fsPath, 'bin/codeownership');
this.isConfigured = existsSync(binaryPath);
this.statusProvider.isConfigured = this.isConfigured;

if (!this.isConfigured) {
log(
'info',
`No code ownership binary found in workspace: ${this.workspace.name}`,
);
} else {
log(
'info',
`Code ownership binary found in workspace: ${this.workspace.name}`,
);
}
}

Choose a reason for hiding this comment

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

🔥

@technicalpickles technicalpickles merged commit aef7a0a into main Nov 26, 2024
2 checks passed
@technicalpickles technicalpickles deleted the handle-no-codeowner branch November 26, 2024 18:11
@technicalpickles technicalpickles mentioned this pull request Nov 26, 2024
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.

3 participants