Skip to content

chore: use eslint copyright plugin#250

Open
feloy wants to merge 3 commits intopodman-desktop:mainfrom
feloy:chore/eslint-copyright
Open

chore: use eslint copyright plugin#250
feloy wants to merge 3 commits intopodman-desktop:mainfrom
feloy:chore/eslint-copyright

Conversation

@feloy
Copy link
Copy Markdown
Contributor

@feloy feloy commented Feb 16, 2026

Signed-off-by: Philippe Martin <phmartin@redhat.com>
@feloy feloy requested review from a team and benoitf as code owners February 16, 2026 08:24
@feloy feloy requested review from SoniaSandler and axel7083 and removed request for a team February 16, 2026 08:24
Signed-off-by: Philippe Martin <phmartin@redhat.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 16, 2026

📝 Walkthrough

Walkthrough

Updates CI checkout shallow depth and adds a git fetch since 2025-12-30; adds an ESLint plugin and devDependency; adds an RPC package re-export index; expands extension activation/deactivation tests; updates many file header copyright years to include 2026.

Changes

Cohort / File(s) Summary
CI workflow
.github/workflows/pr-check.yaml
Increases actions/checkout fetch-depth to 10 and adds a post-checkout step that runs git fetch --shallow-since=2025-12-30 (prepares commit history for eslint copyright checks).
Build & Linting
eslint.config.mjs, package.json
Adds @podman-desktop/eslint-plugin to devDependencies and imports podmanDesktopLinter in ESLint config, injecting podmanDesktopLinter.configs.recommended into the top-level config array.
RPC public exports
packages/rpc/src/index.ts
Adds new index.ts re-exporting createRpcChannel, RpcChannel, RpcExtension, and RpcBrowser from ./rpc, exposing these symbols in the package public API.
Extension tests
packages/extension/src/main.spec.ts
Adds license header, mocks ContextsExtension, introduces an ExtensionContext mock and beforeEach setup, and new tests verifying activation, deactivation, and global state cleanup.
Copyright / headers
packages/channels/src/..., packages/extension/src/manager/..., packages/webview/src/component/..., packages/webview/src/component/dialog/...
Bumped copyright/header years across many source and spec files to include 2026; no logic or API changes.
Specs (minor header updates)
packages/webview/src/component/*.spec.ts, packages/.../*.spec.ts
Multiple test/spec files only had header year updates; no behavioral or code changes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The PR title 'chore: use eslint copyright plugin' accurately summarizes the main change—adding and configuring the eslint copyright plugin for the codebase.
Description check ✅ Passed The PR description is directly related to the changeset, describing the three main objectives: adding the eslint plugin, fixing copyright headers, and adjusting CI fetch behavior.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@feloy feloy force-pushed the chore/eslint-copyright branch from 0627de7 to c96ee04 Compare February 16, 2026 08:24
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/extension/src/main.spec.ts (1)

49-49: ⚠️ Potential issue | 🟡 Minor

Copy-paste comment: "IBM Cloud Extension" should be "Contexts Extension".

Proposed fix
-  // Call activate first to initialize IBM Cloud Extension
+  // Call activate first to initialize Contexts Extension
🧹 Nitpick comments (2)
.github/workflows/pr-check.yaml (1)

39-41: fetch-depth: 0 adds full clone overhead to every matrix build.

The copyright ESLint plugin likely needs git history, but only the lint step (which runs on all matrix OSes at Line 73) benefits from it. Consider running the linter on a single OS only, or restricting fetch-depth: 0 to the runner that actually executes lint:check, to avoid slowing down Windows and macOS builds unnecessarily.

packages/rpc/src/index.ts (1)

19-21: Simplify to a single re-export statement.

The separate import and export can be collapsed into a direct re-export.

Proposed change
-import { createRpcChannel, RpcChannel, RpcExtension, RpcBrowser } from './rpc';
-
-export { createRpcChannel, RpcChannel, RpcExtension, RpcBrowser };
+export { createRpcChannel, RpcChannel, RpcExtension, RpcBrowser } from './rpc';

@feloy feloy force-pushed the chore/eslint-copyright branch 6 times, most recently from 52e58c2 to 58477f1 Compare February 16, 2026 09:52
Signed-off-by: Philippe Martin <phmartin@redhat.com>
@feloy feloy force-pushed the chore/eslint-copyright branch from 58477f1 to 5f1ddae Compare February 16, 2026 10:37
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @.github/workflows/pr-check.yaml:
- Around line 40-41: Update the workflow comment and/or value for the GitHub
Action checkout fetch-depth: currently set to "fetch-depth: 10" in the
.github/workflows/pr-check.yaml step; either increase the numeric cap to a safer
default (e.g., 0 or a larger number) or change the comment to clarify that the
subsequent fetch using --shallow-since will deepen history for PRs with more
than 10 commits so the eslint copyright check will still work; make the change
next to the fetch-depth: 10 line and keep the --shallow-since mention
consistent.
🧹 Nitpick comments (1)
.github/workflows/pr-check.yaml (1)

43-45: Hardcoded date 2025-12-30 will require annual maintenance.

This date will need to be bumped every January to include the previous year's commits. Consider computing it dynamically to avoid silent breakage when someone forgets to update it.

♻️ Suggested dynamic date computation
      - name: fetch year's commits and at least one commit of last year, for eslint copyright check
        run: |
-         git fetch --shallow-since=2025-12-30 
+         SINCE_DATE="$(date -d "$(date +%Y)-01-01 -2 days" +%Y-%m-%d)" 
+         git fetch --shallow-since="$SINCE_DATE"

This computes a date ~2 days before January 1st of the current year, so it always captures at least one commit from the prior year without manual updates.

Note: date -d is GNU date syntax (available on ubuntu-* runners). On macOS runners this would need date -v syntax, but this step only runs in the build job matrix which includes all three OS types. If that's a concern, you could conditionally run this only on Linux or use a cross-platform approach.

Comment on lines +40 to +41
with:
fetch-depth: 10 # must be at least the number of commits in the PR, for eslint copyright check
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

The fetch-depth: 10 cap could be insufficient for large PRs.

The comment says this must be at least the number of commits in the PR, but PRs can exceed 10 commits. While the subsequent --shallow-since fetch likely compensates by deepening the history, the comment implies a constraint that isn't actually enforced. Consider either raising this value or clarifying the comment to note that the follow-up fetch step handles the deeper history.

🤖 Prompt for AI Agents
In @.github/workflows/pr-check.yaml around lines 40 - 41, Update the workflow
comment and/or value for the GitHub Action checkout fetch-depth: currently set
to "fetch-depth: 10" in the .github/workflows/pr-check.yaml step; either
increase the numeric cap to a safer default (e.g., 0 or a larger number) or
change the comment to clarify that the subsequent fetch using --shallow-since
will deepen history for PRs with more than 10 commits so the eslint copyright
check will still work; make the change next to the fetch-depth: 10 line and keep
the --shallow-since mention consistent.

@benoitf benoitf enabled auto-merge (squash) February 25, 2026 15:13
@benoitf benoitf disabled auto-merge February 25, 2026 15:13
@benoitf benoitf removed their request for review April 9, 2026 12:27
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.

1 participant