13 Commits
Author SHA1 Message Date
Eric Fennis b196797ede Update deps (#5146) 2026-11-02 18:39:06 +01:00
Eric Fennis d4f4e69d00 feat: add icon metadata suggestion functionality (#5117)
- Implemented `createIconIndex` to resolve icon markers and manage metadata.
- Introduced `metadata.mts` for defining metadata fields and types.
- Created `model.mts` for handling metadata suggestions and OpenAI interactions.
- Developed `pullRequest.mts` to manage pull request suggestions and caching.
- Added `referenceExamples.mts` for generating reference examples based on icon metadata.
- Established `repository.mts` for loading categories, groups, and icons from the repository.
- Built `suggestionComments.mts` to generate GitHub review comments with suggestions for icon metadata.
2026-10-29 17:34:30 +01:00
Eric FennisandClaude Opus 5.5 24e54e847f ci(icon-preview): move icon preview into a composite action on pull_request_target (#5064)
* refactor(ci): move icon preview markup into a composite action

Move generateChangedIconsCommentMarkup.mts into .github/actions/icon-preview
as its own pnpm workspace package, following the suggest-metadata action.
svgson and @lucide/helpers are now real dependencies installed with a
filtered pnpm install, replacing the ad-hoc `npm install svgson --force`.

Paths are resolved from the repo root relative to the script, so it also
works through `pnpm --filter @lucide/icon-preview-action start`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(ci): skip icon preview comment when no icons changed

When a pull request only deletes icons, CHANGED_FILES has no SVGs and the
script printed "No changed icons found" to stdout, which was then posted as
the preview comment.

The script now logs that to stderr. The action writes no markup file and
sets `has-changes=false`, the workflow skips the artifact upload, and the
comment workflow skips its steps when no artifact exists instead of failing
on the missing artifact.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ci(icon-preview): post the preview comment from a pull_request_target workflow

Like the PR title workflow, the icon preview now runs on pull_request_target
and posts its comment directly, so comment-icon-preview.yml and the
workflow_run artifact hand-off are removed.

The job checks out the base branch and runs the action from there. The
changed SVGs are read from the pull request head with `git fetch` + `git show`
into a temp directory, so no code from the pull request is checked out or run.
File names are checked against `icons/<kebab-case>.svg` before use.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 08:13:27 +01:00
Eric FennisandClaude Opus 5.5 7faf87628a fix(ci): prevent broken and duplicate metadata suggestions (#5065)
* fix(ci): store metadata suggestions in the review instead of actions/cache

pull_request_target runs can't write to the Actions cache ("cache write
denied: token has no writable scopes"), so the cache was never saved and
the model was asked again on every push. That produced new suggestions
anchored on the same lines as earlier ones.

Store the model's suggestions per icon name as hidden JSON in the review
body and read them back from the bot's earlier reviews, so the API is only
called for icons without stored suggestions. This drops the gh api and
actions/cache steps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TSdUq9uFpjuQsoobCBqz4j

* fix(ci): handle earlier metadata suggestion comments on older PRs

- Read values from the oldest comment format too, which doesn't start with
  "Suggested `field`" and was posted without a closing fence; the field
  is taken from the suggestion's `"field": [` line.
- Skip a field while an earlier suggestion for it is still applicable (not
  outdated), so two suggestions never replace overlapping lines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TSdUq9uFpjuQsoobCBqz4j

* fix(ci): read icon metadata at the reviewed commit

The review comments are anchored to the commit that triggered the run,
but the icon JSON was read through the PR files' raw_url, which always
points at the latest head. When a commit was pushed while the action
was running, suggestions were anchored to the wrong lines, e.g. a
use-cases block replacing the "tags": [ line, producing invalid JSON.

Read each file at the reviewed commit instead, default that commit to the
PR's head SHA, and skip files that don't exist at it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TSdUq9uFpjuQsoobCBqz4j

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-23 18:50:46 +02:00
Eric FennisandClaude Opus 5.5 1ea91c0b72 ci(metadata-suggestions): run on every PR update with cached suggestions (#5062)
* feat(ci): run metadata suggestions on every PR update with cached results

- Run on opened/reopened/synchronize and queue runs per PR.
- Cache the model's suggestions per icon name with actions/cache, so the
  OpenAI API is only called again for icons that are added or renamed.
- Skip suggestions that were already posted instead of skipping the whole
  PR once it has a review.
- Suggest only the values to append after the last array item instead of
  the whole array; empty and inline arrays still get the full block.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TSdUq9uFpjuQsoobCBqz4j

* refactor(ci): key the suggestions cache on the PR's icon names

Replace the separate restore/save steps and the `cache-updated` output
with a single actions/cache step keyed on a hash of the changed icon
files, so the API is only called again when icon names change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TSdUq9uFpjuQsoobCBqz4j

* style(ci): drop trailing blank line in suggest-metadata action

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TSdUq9uFpjuQsoobCBqz4j

* fix(ci): dedupe metadata suggestions by value instead of comment body

The append-style suggestion includes the array's current last item, so
comparing whole comment bodies reposted the same values after a
contributor added a tag or applied part of a suggestion. Read the values
back from the bot's earlier suggestion blocks per file and field, and
exclude them like the current values.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TSdUq9uFpjuQsoobCBqz4j

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-23 18:04:30 +02:00
Eric FennisandClaude Opus 5.5 c32d98db9b ci(metadata-suggestions): Improve suggest metadata action (#5061)
* fix(scripts): keep contributors out of metadata suggestions

The shared metadata instructions include a Contributors section asking to
add the PR author, but the suggestion schema has no contributors field, so
the model leaked it into use-cases. Strip that section from the prompt and
explicitly restrict suggestions to tags, categories and use-cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MThCx7cVXV3XWfo5C327Ci

* refactor(ci): move metadata suggestions into a dedicated composite action

Move scripts/suggestMetaData.mts to .github/actions/suggest-metadata and
wrap it in a composite action with explicit inputs. The workflow now uses
the local action; package.json scripts point to the new location.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MThCx7cVXV3XWfo5C327Ci

* chore(ci): add .env.example for testing the suggest-metadata action locally

Document the env vars the script reads, point the debug/watch scripts at
an action-local .env, and fix the USE_FILE_SYSYEM typo.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MThCx7cVXV3XWfo5C327Ci

* chore(ci): make .github/actions a pnpm workspace

Add .github/actions/* to the pnpm workspace and give the suggest-metadata
action its own package.json with its dependencies (openai, zod, dotenv,
@octokit/rest). openai, zod and dotenv move out of the root package.json;
@octokit/rest stays there for updateContributors. The workflow now only
installs the action's dependencies, and the root suggest:metadata scripts
delegate to the action package.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MThCx7cVXV3XWfo5C327Ci

* Upgrade to gpt-6-luna

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-23 14:26:48 +02:00
Eric Fennis 3c23331e9e ci(actions): Update & cleanup actions (#2764)
* Update actions

* Update workflows

* Remove double jobs
2025-02-28 14:59:41 +01:00
Han Yeong-woo eb035fe370 Improve formatting (#1814)
* Ignore linting for examples in docs

* Formatting JSX single attribute per line

* Separte `format` and `lint:format` in package.json

* Bump prettier version

* Run format
2024-02-01 14:38:21 +01:00
Han Yeong-wooandEric Fennis 675158df16 Cleanup tools (#1756)
* Use prettier own instead of eslint plugin

* Extend prettier config angular eslint

* Upgrade root prettier to 3

* Fix css syntax errors

* Change eslint ignore to prettier ignore

* Ignore formatting for outputs

* Fix lint-staged error when edited multiple files

* Bump pnpm version

* Remove unnecessary pnpm config

---------

Co-authored-by: Eric Fennis <eric.fennis@gmail.com>
2024-01-18 12:36:48 +01:00
Han Yeong-woo 3fe74beeb0 Bump github actions (#1755) 2024-01-02 15:33:27 +01:00
Eric Fennis 7c8f898893 Improve release workflow (#1397)
* first fixes release workflow

* improve workflow

* remove legacy ::set-outputs
2023-07-02 14:46:53 +02:00
KarsaandKarsa 1479a9dbd8 Fixes pre-commit git hook to ensure the optimisation of staged icons (#958)
* testing

* Fixes pre-commit hook

* Removing checkIcons from pre commit hook because it might result in false positives and negatives on an unclean local repository

* Added checkIcons Github action

---------

Co-authored-by: Karsa <karsa@karsa.org>
2023-02-28 17:24:17 +01:00
Eric Fennis 8fd8007c96 Add support for aliases (#899)
* extract workflow

* Add aliases build

* Setup types building for aliases

* Add types generation for aliases

* Finish React Aliases

* Finish aliases for lucide-react

* setup aliases preact

* Fix aliases in preact

* Add aliases preact

* Add aliases lucide-react-native

* Fix solid js build

* update lock file

* Improve solid for solid start

* update import

* update import

* lucide solid fix types generation

* Fix lucide sold

* Fix svelte aliases

* update lockfile

* Fix imports

* Fix solid js issues

* Add aliases to the vue packages

* Fix lucide react native

* Test alpha versions lucide-vue, lucide-vue-next, lucide-svelte
2023-01-17 08:04:34 +01:00