Conversation
There was a problem hiding this comment.
license-eye has checked 129 files.
| Valid | Invalid | Ignored | Fixed |
|---|---|---|---|
| 31 | 1 | 97 | 0 |
Click to see the invalid file list
- eslint.config.js
Use this command to fix any missing license headers
```bash
docker run -it --rm -v $(pwd):/github/workspace apache/skywalking-eyes header fix
</details>
eslint.config.js
Outdated
| @@ -0,0 +1,34 @@ | |||
| // Flat ESLint config for ESLint v10 | |||
There was a problem hiding this comment.
| // Flat ESLint config for ESLint v10 | |
| /* | |
| * Copyright 2026 Canonical Ltd. | |
| * See LICENSE file for licensing details. | |
| */ | |
| // Flat ESLint config for ESLint v10 |
There was a problem hiding this comment.
license-eye has checked 144 files.
| Valid | Invalid | Ignored | Fixed |
|---|---|---|---|
| 31 | 1 | 112 | 0 |
Click to see the invalid file list
- eslint.config.cjs
Use this command to fix any missing license headers
```bash
docker run -it --rm -v $(pwd):/github/workspace apache/skywalking-eyes header fix
</details>
| @@ -0,0 +1,77 @@ | |||
| // ESLint v9 flat config (CommonJS) | |||
There was a problem hiding this comment.
| // ESLint v9 flat config (CommonJS) | |
| /* | |
| * Copyright 2026 Canonical Ltd. | |
| * See LICENSE file for licensing details. | |
| */ | |
| // ESLint v9 flat config (CommonJS) |
There was a problem hiding this comment.
license-eye has checked 144 files.
| Valid | Invalid | Ignored | Fixed |
|---|---|---|---|
| 31 | 1 | 112 | 0 |
Click to see the invalid file list
- eslint.config.cjs
Use this command to fix any missing license headers
```bash
docker run -it --rm -v $(pwd):/github/workspace apache/skywalking-eyes header fix
</details>
| @@ -0,0 +1,77 @@ | |||
| // ESLint v9 flat config (CommonJS) | |||
There was a problem hiding this comment.
| // ESLint v9 flat config (CommonJS) | |
| /* | |
| * Copyright 2026 Canonical Ltd. | |
| * See LICENSE file for licensing details. | |
| */ | |
| // ESLint v9 flat config (CommonJS) |
Test results for commit 75c7427Test coverage for 75c7427 Static code analysis report |
Test results for commit 75c7427Test coverage for 75c7427 Static code analysis report |
Test results for commit 75c7427Test coverage for 75c7427 Static code analysis report |
Test results for commit 75c7427Test coverage for 75c7427 Static code analysis report |
Test results for commit 75c7427Test coverage for 75c7427 Static code analysis report |
Test results for commit 75c7427Test coverage for 75c7427 Static code analysis report |
Unused entries in .trivyignoreImage: ghcr.io/canonical/test-foo:73ebae26eaf71e0462669ed86b00b03f1351934e-_1.0_amd64 The following CVEs are in |
There was a problem hiding this comment.
Pull request overview
Adds support for discovering and publishing multiple charm artifacts produced across multiple integration-test workflow runs, and updates ESLint configuration to resolve linting errors.
Changes:
- Aggregate
.charmartifacts across successful integration workflow runs for the current commit. - Migrate ESLint to a v9 flat config and simplify
npm run lint. - Minor output/serialization tweaks for plan/run-id outputs.
Reviewed changes
Copilot reviewed 8 out of 41 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/publish.ts | Adds cross-workflow-run charm artifact aggregation and de-duplication before publish. |
| src/plan.ts | Adjusts artifact name sanitization and imports crypto for ID generation. |
| src/get-plan.ts | Ensures outputs are serialized as strings (plan, run-id). |
| package.json | Updates lint script, ESLint version, and adds package type. |
| internal/publish/action.yaml | Adds optional integration-workflow-file input for aggregation. |
| eslint.config.cjs | Introduces ESLint v9 flat config (replacing .eslintignore). |
| docs/changelog.md | Documents the new aggregation feature and ESLint changes. |
| .eslintignore | Removed in favor of flat config ignores. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "test": "npx jest", | ||
| "all": "npm run format:write && npm run lint && npm run test && npm run coverage && npm run package" | ||
| }, | ||
| "type": "module", |
There was a problem hiding this comment.
Setting "type": "module" makes all .js files in this package ESM by default, which can break GitHub Action runtime and/or the ncc bundled output if it is emitted as CommonJS (typical ncc output uses require/module.exports). Consider removing this, or ensure the built entrypoints in dist use .cjs (or otherwise guarantee ESM-compatible output).
| "type": "module", |
| repo, | ||
| workflow_id: workflowId, | ||
| per_page: 100, | ||
| status: 'success' |
There was a problem hiding this comment.
This paginates through all successful runs of the workflow, which can be very slow and may hit rate limits on repos with many historical runs. Prefer narrowing the query by passing + "head_sha: github.context.sha" + (supported by listWorkflowRuns) and/or avoid full pagination (e.g., fetch only the first page until a match is found).
| status: 'success' | |
| status: 'success', | |
| head_sha: github.context.sha |
| } catch (e) { | ||
| core.info( | ||
| `Failed downloading artifact ${art.name} from run ${run.id}: ${String(e)}` | ||
| ) |
There was a problem hiding this comment.
Temporary directories created per artifact are never cleaned up. Over multiple runs/artifacts this can leak disk space in the runner. Add a + "finally" + block that removes + "tmp" + (recursive) once scanning is done, regardless of success/failure.
| ) | |
| ) | |
| } finally { | |
| try { | |
| fs.rmSync(tmp, { recursive: true, force: true }) | |
| } catch { | |
| // Ignore cleanup errors | |
| } |
| module.exports = [ | ||
| // Migrate from .eslintignore | ||
| { | ||
| ignores: ['lib/', 'dist/', 'node_modules/', 'coverage/', '**/*.json'] |
There was a problem hiding this comment.
The flat config ignores + "/*.json" + globally, but the same file later defines rules for JSON files ( + "files: ['/.json']" + ). With the ignore in place, JSON linting/formatting rules will never run. Remove + "'**/.json'" + from ignores if you intend to lint JSON.
| ignores: ['lib/', 'dist/', 'node_modules/', 'coverage/', '**/*.json'] | |
| ignores: ['lib/', 'dist/', 'node_modules/', 'coverage/'] |
|
|
||
| ## 2026-02-12 | ||
|
|
||
| - Fix ESLint workflow due to ESLint 10.0.0 release. |
There was a problem hiding this comment.
The changelog line references fixing issues due to ESLint 10.0.0, but this PR pins ESLint to + "^9.0.0" + and adds a v9 flat config. Consider rewording to reflect the actual change (e.g., migrating to flat config / aligning with ESLint v9) to avoid confusion.
| - Fix ESLint workflow due to ESLint 10.0.0 release. | |
| - Update ESLint workflow to pin ESLint to `^9.0.0` and use the v9 flat config. |
| "./__tests__", | ||
| "./coverage" | ||
| ] | ||
| } No newline at end of file |
|
Mmm, will this work correctly it the charms have images and resources? |
Applicable spec:
Overview
Rationale
Workflow Changes
Checklist
urgent,trivial,complex)