Skip to content

Jjones/auro migration bot - #294

Draft
jordanjones243 wants to merge 31 commits into
devfrom
jjones/auro-migration-bot
Draft

Jjones/auro migration bot#294
jordanjones243 wants to merge 31 commits into
devfrom
jjones/auro-migration-bot

Conversation

@jordanjones243

Copy link
Copy Markdown
Contributor

Alaska Airlines Pull Request

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Checklist:

  • My update follows the CONTRIBUTING guidelines of this project
  • I have performed a self-review of my own update

By submitting this Pull Request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Pull Requests will be evaluated by their quality of update and whether it is consistent with the goals and values of this project. Any submission is to be considered a conversation between the submitter and the maintainers of this project and may require changes to your submission.

Thank you for your submission!

-- Auro Design System Team

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry @jordanjones243, your pull request is larger than the review limit of 150000 diff characters

…e repos

Introduces `auro version-scan`, the read-only producer step for the version bot. Scans a GitHub org (default `Alaska-ECommerce`), extracts pinned Auro versions from each repo's root package.json, compares against the npm registry, and emits a flat upgrade-candidates JSON for the (still TBD) version-tickets command to consume.

- Add `src/scripts/version-bot/scan.ts` with `runScan({ org, force })`
- Paginated `octokit.repos.listForOrg` call, filtering out archived/fork repos
- Fetches root `package.json` via `repos.getContent`, extracts `@aurodesignsystem/*` and `@alaskaairux/*` from deps + devDeps
- Builds an archived-package set from the `AlaskaAirlines` org so retired components are dropped from candidates (but kept in the cache for fidelity)
- Per-repo `pushed_at` short-circuit makes re-runs incremental; `--force` bypasses it
- One `npmLatest` lookup per distinct package, then `majorsBehind` per (repo, package) pair — anything `>= 1` becomes an UpgradeCandidate
- Writes both `auro-deps-by-ecommerce-repo.json` and `auro-upgrade-candidates.json` under `~/.auro/version-bot/`
- Add `src/commands/version-scan.ts` with commander registration
- Options: `--org <name>` (default `Alaska-ECommerce`), `--force`
- Renders a chalk summary on success; exits 1 on failure
 - Wire the new command import into `src/index.ts`
- Update `project-plan.md` to reflect Phase 3 completion
…le and preview directory options

- Updated package.json to use @aurodesignsystem/auro-library version 5.12.3 and added dotenv dependency.
- Modified version-tickets command to accept --candidates and --preview-dir options for custom candidate input and HTML preview output.
- Refactored create-tickets script to read candidates from a specified file and generate HTML previews during dry runs.
- Introduced new html-preview module to handle HTML file generation for candidates.
- Added test fixtures for various upgrade scenarios to validate the new functionality visually.
`npm run build` was failing on TS2578 (unused @ts-expect-error) and TS7016 (no types for sharedFileProcessorUtils.mjs).

- Swapped to @ts-ignore so the directive doesn't error when there's nothing to suppress, and collapsed the import to one line so the directive covers the `from "..."` line where TS reports the error.
- Added `biome-ignore format` to keep the formatter from re-breaking it.
project-plan.md and CONTEXT.md are personal collaboration scratchpad between Jordan and Claude — not team artifacts. Move both (along with the docs/ folder's prep docs) into .claude/notes/ and gitignore the subdir. Keep the rule narrow so future intentional .claude/ subdirs (settings/hooks/skills) can still be tracked when added.
- Introduced functions to create and close Azure DevOps work items, including error handling and logging.
- Added a new WIQL module to query open bot tickets based on repository and package.
- Implemented an audit log system to track the creation and closure of work items.
- Enhanced changelog processing to include structured data and breaking change detection.
- Developed a cleanup script to manage and close outdated work items based on audit logs.
- Updated ticket creation logic to handle deduplication of existing tickets and manage superseding tickets.
- Improved acceptance criteria generation to include breaking changes and context for upgrades.
…cases

- Updated package.json to replace placeholder test command with vitest commands.
- Added tests for alias resolution in aliases.test.ts to ensure correct mapping from legacy to modern package names.
- Implemented npm registry tests in npm-registry.test.ts to validate version parsing, comparison, and fetching from the npm registry.
- Created template tests in template.test.ts to verify the construction of story titles and acceptance criteria for upgrade candidates.
… handling

- Added `discoverAuroManifests` function to locate all `package.json` files referencing Auro namespaces across repositories.
- Introduced tests for the manifest discovery functionality to ensure correct grouping and filtering of results.
- Updated the `runScan` function to utilize the new manifest discovery, improving the scanning process for Auro dependencies.
- Enhanced `collapseCandidatesByPackage` to handle multiple manifest paths, ensuring accurate upgrade candidate generation.
- Modified acceptance criteria and story body templates to reflect the presence of multiple manifests, providing clearer guidance for engineers on which files to update.
- Incremented `ScanCache` version to 2 to accommodate new fields for manifest paths in upgrade candidates.
- Added compliance status reporting in version-tickets command, displaying skipped candidates due to no usage.
- Introduced compliance evaluation logic in create-tickets script, including handling for not-used candidates.
- Implemented a new evaluatePackage function to assess package compliance status based on policy records.
- Created a policy catalog for managing package deprecations and replacements, ensuring proper status reporting.
- Developed tests for evaluatePackage and policy catalog to ensure correct functionality and coverage.
- Updated ticket body generation to include incident notes from policy records, improving communication of known issues.
- Refactored changelog handling to present a structured "What's new" section, replacing the previous inline changelog dump.
- Added support for incident notes in ticket generation, providing context for pinned versions during regressions.
- Added a new dashboard link in the demo index.html for viewing compliance metrics.
- Introduced a styled introduction section in the sidebar to explain the bot's functionality.
- Implemented a new serveDashboard function to serve the dashboard HTML.
- Created serveFindings function to aggregate and serve compliance findings data.
- Enhanced data processing for compliance metrics, including top repos and packages.
- Added detailed compliance breakdown per repository, including status and issues.
- Introduced a new HTML runbook page to guide users through the bot's quarterly pipeline.
- Updated server to serve the runbook and handle requests for Auro design system assets.
- Added dependencies for Auro Alert and Auro Button components, along with design tokens and webcore stylesheets.
- Enhanced the server's asset serving capabilities to include files from the Auro design system.
@jordanjones243
jordanjones243 force-pushed the jjones/auro-migration-bot branch from dc37ccb to 38c7056 Compare May 21, 2026 18:24
@github-actions

Copy link
Copy Markdown

🚀 PR Release Published! @aurodesignsystem-dev/auro-cli@0.0.0-pr294.0 View on npmjs.com

@github-actions

Copy link
Copy Markdown

🚀 PR Release Published! @aurodesignsystem-dev/auro-cli@0.0.0-pr294.1 View on npmjs.com

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