Remove lucide & replace by octicons
@@ -48,10 +48,7 @@ For example: `ci/django.yml` and `ci/properties/django.properties.json`, or `age
|
|||||||
|
|
||||||
* `name`: the name shown in onboarding. This property is unique within the repository.
|
* `name`: the name shown in onboarding. This property is unique within the repository.
|
||||||
* `description`: the description shown in onboarding
|
* `description`: the description shown in onboarding
|
||||||
* `iconName`: the icon name in the relevant folder, for example, `django` should have an icon `icons/django.svg`. Supported formats:
|
* `iconName`: the icon name in the relevant folder, for example, `django` should have an icon `icons/django.svg`. Only SVG is supported at this time. Another option is to use [octicon](https://primer.style/octicons/). The format to use an octicon is `octicon <<icon name>>`. Example: `octicon person`
|
||||||
- **Local SVG**: Use the file name without extension (e.g., `django` for `icons/django.svg`)
|
|
||||||
- **Octicon**: Use `octicon <<icon name>>` (e.g., `octicon person`). See [octicons](https://primer.style/octicons/).
|
|
||||||
- **Lucide**: Use `lucide <<icon name>>` (e.g., `lucide bug`). See [lucide icons](https://lucide.dev/icons/).
|
|
||||||
* `creator`: creator of the template shown in onboarding. All the workflow templates from an author will have the same `creator` field.
|
* `creator`: creator of the template shown in onboarding. All the workflow templates from an author will have the same `creator` field.
|
||||||
* `categories`: the categories that it will be shown under. Choose at least one category from the list [here](#categories). Further, choose the categories from the list of languages available [here](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml) and the list of tech stacks available [here](https://github.com/github-starter-workflows/repo-analysis-partner/blob/main/tech_stacks.yml). When a user views the available templates, those templates that match the language and tech stacks will feature more prominently.
|
* `categories`: the categories that it will be shown under. Choose at least one category from the list [here](#categories). Further, choose the categories from the list of languages available [here](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml) and the list of tech stacks available [here](https://github.com/github-starter-workflows/repo-analysis-partner/blob/main/tech_stacks.yml). When a user views the available templates, those templates that match the language and tech stacks will feature more prominently.
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "CI Doctor",
|
"name": "CI Doctor",
|
||||||
"description": "Monitor CI workflows and investigate failures automatically.",
|
"description": "Monitor CI workflows and investigate failures automatically.",
|
||||||
"iconName": "lucide stethoscope",
|
"iconName": "octicon pulse",
|
||||||
"categories": ["Agentic", "Fault Analysis"]
|
"categories": ["Agentic", "Fault Analysis"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "Code Simplifier",
|
"name": "Code Simplifier",
|
||||||
"description": "Automatically simplify recently modified code for improved clarity and maintainability.",
|
"description": "Automatically simplify recently modified code for improved clarity and maintainability.",
|
||||||
"iconName": "lucide wand-sparkles",
|
"iconName": "octicon sparkles-fill",
|
||||||
"categories": ["Agentic", "Code Improvement"]
|
"categories": ["Agentic", "Code Improvement"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "Daily Documentation Updater",
|
"name": "Daily Documentation Updater",
|
||||||
"description": "Automatically update documentation based on recent code changes and merged PRs.",
|
"description": "Automatically update documentation based on recent code changes and merged PRs.",
|
||||||
"iconName": "lucide scroll-text",
|
"iconName": "octicon book",
|
||||||
"categories": ["Agentic", "Code Improvement"]
|
"categories": ["Agentic", "Code Improvement"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "Daily Repo Status",
|
"name": "Daily Repo Status",
|
||||||
"description": "Assess repository activity and create status reports.",
|
"description": "Assess repository activity and create status reports.",
|
||||||
"iconName": "lucide users",
|
"iconName": "octicon people",
|
||||||
"categories": ["Agentic", "Research & Planning"]
|
"categories": ["Agentic", "Research & Planning"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "Daily Team Status",
|
"name": "Daily Team Status",
|
||||||
"description": "Create upbeat daily team activity summaries with productivity insights.",
|
"description": "Create upbeat daily team activity summaries with productivity insights.",
|
||||||
"iconName": "lucide user-round",
|
"iconName": "octicon person",
|
||||||
"categories": ["Agentic", "Research & Planning"]
|
"categories": ["Agentic", "Research & Planning"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "Daily Test Improver",
|
"name": "Daily Test Improver",
|
||||||
"description": "Improve test coverage by adding meaningful tests to under-tested areas.",
|
"description": "Improve test coverage by adding meaningful tests to under-tested areas.",
|
||||||
"iconName": "lucide test-tube",
|
"iconName": "octicon beaker",
|
||||||
"categories": ["Agentic", "Code Improvement"]
|
"categories": ["Agentic", "Code Improvement"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "Duplicate Code Detector",
|
"name": "Duplicate Code Detector",
|
||||||
"description": "Identify duplicate code patterns and suggest refactoring opportunities.",
|
"description": "Identify duplicate code patterns and suggest refactoring opportunities.",
|
||||||
"iconName": "lucide copy",
|
"iconName": "octicon search",
|
||||||
"categories": ["Agentic", "Code Improvement"]
|
"categories": ["Agentic", "Code Improvement"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "Issue Triage",
|
"name": "Issue Triage",
|
||||||
"description": "Triage labelling of issues and pull requests and not much more.",
|
"description": "Triage labelling of issues and pull requests and not much more.",
|
||||||
"iconName": "lucide tag",
|
"iconName": "octicon tag",
|
||||||
"categories": ["Agentic", "Maintainer"]
|
"categories": ["Agentic", "Maintainer"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "PR Fix",
|
"name": "PR Fix",
|
||||||
"description": "Analyze failing CI checks and implement fixes for pull requests.",
|
"description": "Analyze failing CI checks and implement fixes for pull requests.",
|
||||||
"iconName": "lucide wrench",
|
"iconName": "octicon tools",
|
||||||
"categories": ["Agentic", "Fault Analysis"]
|
"categories": ["Agentic", "Fault Analysis"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "Repo Assist",
|
"name": "Repo Assist",
|
||||||
"description": "A regular, pervasive all-tools repository assistant that triages issues, investigates issues, replies with comments, fixes bugs, proposes engineering improvements, and maintains activity summaries.",
|
"description": "A regular, pervasive all-tools repository assistant that triages issues, investigates issues, replies with comments, fixes bugs, proposes engineering improvements, and maintains activity summaries.",
|
||||||
"iconName": "lucide bot",
|
"iconName": "octicon dependabot",
|
||||||
"categories": ["Agentic", "Maintainer"]
|
"categories": ["Agentic", "Maintainer"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "Repository Quality Improver",
|
"name": "Repository Quality Improver",
|
||||||
"description": "Daily rotating analysis of repository quality across code, documentation, testing, security, and custom dimensions.",
|
"description": "Daily rotating analysis of repository quality across code, documentation, testing, security, and custom dimensions.",
|
||||||
"iconName": "lucide chart-column",
|
"iconName": "octicon graph-bar-horizontal",
|
||||||
"categories": ["Agentic", "Code Improvement"]
|
"categories": ["Agentic", "Code Improvement"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
<svg
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
width="24"
|
|
||||||
height="24"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
fill="none"
|
|
||||||
stroke="currentColor"
|
|
||||||
stroke-width="2"
|
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
>
|
|
||||||
<path d="M12 8V4H8" />
|
|
||||||
<rect width="16" height="12" x="4" y="8" rx="2" />
|
|
||||||
<path d="M2 14h2" />
|
|
||||||
<path d="M20 14h2" />
|
|
||||||
<path d="M15 13v2" />
|
|
||||||
<path d="M9 13v2" />
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 380 B |
@@ -1,16 +0,0 @@
|
|||||||
<svg
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
width="24"
|
|
||||||
height="24"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
fill="none"
|
|
||||||
stroke="currentColor"
|
|
||||||
stroke-width="2"
|
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
>
|
|
||||||
<path d="M3 3v16a2 2 0 0 0 2 2h16" />
|
|
||||||
<path d="M18 17V9" />
|
|
||||||
<path d="M13 17V5" />
|
|
||||||
<path d="M8 17v-3" />
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 320 B |
@@ -1,14 +0,0 @@
|
|||||||
<svg
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
width="24"
|
|
||||||
height="24"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
fill="none"
|
|
||||||
stroke="currentColor"
|
|
||||||
stroke-width="2"
|
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
>
|
|
||||||
<rect width="14" height="14" x="8" y="8" rx="2" ry="2" />
|
|
||||||
<path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" />
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 339 B |
@@ -1,16 +0,0 @@
|
|||||||
<svg
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
width="24"
|
|
||||||
height="24"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
fill="none"
|
|
||||||
stroke="currentColor"
|
|
||||||
stroke-width="2"
|
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
>
|
|
||||||
<path d="M15 12h-5" />
|
|
||||||
<path d="M15 8h-5" />
|
|
||||||
<path d="M19 17V5a2 2 0 0 0-2-2H4" />
|
|
||||||
<path d="M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3" />
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 419 B |
@@ -1,17 +0,0 @@
|
|||||||
<svg
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
width="24"
|
|
||||||
height="24"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
fill="none"
|
|
||||||
stroke="currentColor"
|
|
||||||
stroke-width="2"
|
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
>
|
|
||||||
<path d="M11 2v2" />
|
|
||||||
<path d="M5 2v2" />
|
|
||||||
<path d="M5 3H4a2 2 0 0 0-2 2v4a6 6 0 0 0 12 0V5a2 2 0 0 0-2-2h-1" />
|
|
||||||
<path d="M8 15a6 6 0 0 0 12 0v-3" />
|
|
||||||
<circle cx="20" cy="10" r="2" />
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 399 B |
@@ -1,14 +0,0 @@
|
|||||||
<svg
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
width="24"
|
|
||||||
height="24"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
fill="none"
|
|
||||||
stroke="currentColor"
|
|
||||||
stroke-width="2"
|
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
>
|
|
||||||
<path d="M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z" />
|
|
||||||
<circle cx="7.5" cy="7.5" r=".5" fill="currentColor" />
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 430 B |
@@ -1,15 +0,0 @@
|
|||||||
<svg
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
width="24"
|
|
||||||
height="24"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
fill="none"
|
|
||||||
stroke="currentColor"
|
|
||||||
stroke-width="2"
|
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
>
|
|
||||||
<path d="M14.5 2v17.5c0 1.4-1.1 2.5-2.5 2.5c-1.4 0-2.5-1.1-2.5-2.5V2" />
|
|
||||||
<path d="M8.5 2h7" />
|
|
||||||
<path d="M14.5 16h-5" />
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 334 B |
@@ -1,14 +0,0 @@
|
|||||||
<svg
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
width="24"
|
|
||||||
height="24"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
fill="none"
|
|
||||||
stroke="currentColor"
|
|
||||||
stroke-width="2"
|
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
>
|
|
||||||
<circle cx="12" cy="8" r="5" />
|
|
||||||
<path d="M20 21a8 8 0 0 0-16 0" />
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 279 B |
@@ -1,16 +0,0 @@
|
|||||||
<svg
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
width="24"
|
|
||||||
height="24"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
fill="none"
|
|
||||||
stroke="currentColor"
|
|
||||||
stroke-width="2"
|
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
>
|
|
||||||
<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" />
|
|
||||||
<path d="M16 3.128a4 4 0 0 1 0 7.744" />
|
|
||||||
<path d="M22 21v-2a4 4 0 0 0-3-3.87" />
|
|
||||||
<circle cx="9" cy="7" r="4" />
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 383 B |
@@ -1,20 +0,0 @@
|
|||||||
<svg
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
width="24"
|
|
||||||
height="24"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
fill="none"
|
|
||||||
stroke="currentColor"
|
|
||||||
stroke-width="2"
|
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
>
|
|
||||||
<path d="m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72" />
|
|
||||||
<path d="m14 7 3 3" />
|
|
||||||
<path d="M5 6v4" />
|
|
||||||
<path d="M19 14v4" />
|
|
||||||
<path d="M10 2v2" />
|
|
||||||
<path d="M7 8H3" />
|
|
||||||
<path d="M21 16h-4" />
|
|
||||||
<path d="M11 3H9" />
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 529 B |
@@ -1,13 +0,0 @@
|
|||||||
<svg
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
width="24"
|
|
||||||
height="24"
|
|
||||||
viewBox="0 0 24 24"
|
|
||||||
fill="none"
|
|
||||||
stroke="currentColor"
|
|
||||||
stroke-width="2"
|
|
||||||
stroke-linecap="round"
|
|
||||||
stroke-linejoin="round"
|
|
||||||
>
|
|
||||||
<path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z" />
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 417 B |
@@ -0,0 +1,15 @@
|
|||||||
|
## Icon map
|
||||||
|
|
||||||
|
| Workflow slug | Old icon | New icon | Icon name |
|
||||||
|
| --- | --- | --- | --- |
|
||||||
|
| issue-triage | 🏷️ | <picture><source media="(prefers-color-scheme: dark)" srcset="https://api.iconify.design/octicon:tag-16.svg?color=%23ffffff"><img src="https://api.iconify.design/octicon:tag-16.svg?color=%23000000" alt="tag" width="18" height="18"></picture> | `octicon tag` |
|
||||||
|
| repo-assist | 🤖 | <picture><source media="(prefers-color-scheme: dark)" srcset="https://api.iconify.design/octicon:dependabot-16.svg?color=%23ffffff"><img src="https://api.iconify.design/octicon:dependabot-16.svg?color=%23000000" alt="dependabot" width="18" height="18"></picture> | `octicon dependabot` |
|
||||||
|
| ci-doctor | 🏥 | <picture><source media="(prefers-color-scheme: dark)" srcset="https://api.iconify.design/octicon:pulse-16.svg?color=%23ffffff"><img src="https://api.iconify.design/octicon:pulse-16.svg?color=%23000000" alt="pulse" width="18" height="18"></picture> | `octicon pulse` |
|
||||||
|
| pr-fix | 🏥 | <picture><source media="(prefers-color-scheme: dark)" srcset="https://api.iconify.design/octicon:tools-16.svg?color=%23ffffff"><img src="https://api.iconify.design/octicon:tools-16.svg?color=%23000000" alt="tools" width="18" height="18"></picture> | `octicon tools` |
|
||||||
|
| daily-repo-status | 👥 | <picture><source media="(prefers-color-scheme: dark)" srcset="https://api.iconify.design/octicon:people-16.svg?color=%23ffffff"><img src="https://api.iconify.design/octicon:people-16.svg?color=%23000000" alt="people" width="18" height="18"></picture> | `octicon people` |
|
||||||
|
| daily-team-status | 👥 | <picture><source media="(prefers-color-scheme: dark)" srcset="https://api.iconify.design/octicon:person-16.svg?color=%23ffffff"><img src="https://api.iconify.design/octicon:person-16.svg?color=%23000000" alt="person" width="18" height="18"></picture> | `octicon person` |
|
||||||
|
| daily-doc-updater | 📖 | <picture><source media="(prefers-color-scheme: dark)" srcset="https://api.iconify.design/octicon:book-16.svg?color=%23ffffff"><img src="https://api.iconify.design/octicon:book-16.svg?color=%23000000" alt="book" width="18" height="18"></picture> | `octicon book` |
|
||||||
|
| code-simplifier | ✨ | <picture><source media="(prefers-color-scheme: dark)" srcset="https://api.iconify.design/octicon:sparkles-fill-16.svg?color=%23ffffff"><img src="https://api.iconify.design/octicon:sparkles-fill-16.svg?color=%23000000" alt="sparkles-fill" width="18" height="18"></picture> | `octicon sparkles-fill` |
|
||||||
|
| duplicate-code-detector | 🔍 | <picture><source media="(prefers-color-scheme: dark)" srcset="https://api.iconify.design/octicon:search-16.svg?color=%23ffffff"><img src="https://api.iconify.design/octicon:search-16.svg?color=%23000000" alt="search" width="18" height="18"></picture> | `octicon search` |
|
||||||
|
| daily-test-improver | 🧪 | <picture><source media="(prefers-color-scheme: dark)" srcset="https://api.iconify.design/octicon:beaker-16.svg?color=%23ffffff"><img src="https://api.iconify.design/octicon:beaker-16.svg?color=%23000000" alt="beaker" width="18" height="18"></picture> | `octicon beaker` |
|
||||||
|
| repository-quality-improver | 📊 | <picture><source media="(prefers-color-scheme: dark)" srcset="https://api.iconify.design/octicon:graph-bar-horizontal-16.svg?color=%23ffffff"><img src="https://api.iconify.design/octicon:graph-bar-horizontal-16.svg?color=%23000000" alt="graph-bar-horizontal" width="18" height="18"></picture> | `octicon graph-bar-horizontal` |
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
export function normalizeSvgIconName(iconName?: string): string | undefined {
|
|
||||||
if (!iconName || iconName.startsWith("octicon")) {
|
|
||||||
return iconName;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (iconName.startsWith("lucide ")) {
|
|
||||||
const lucideName = iconName.slice("lucide ".length).split(".")[0].trim();
|
|
||||||
return lucideName ? `lucide-${lucideName}` : undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
return iconName;
|
|
||||||
}
|
|
||||||
@@ -3,7 +3,6 @@ import { promises as fs } from "fs";
|
|||||||
import { safeLoad } from "js-yaml";
|
import { safeLoad } from "js-yaml";
|
||||||
import { basename, extname, join } from "path";
|
import { basename, extname, join } from "path";
|
||||||
import { exec } from "./exec";
|
import { exec } from "./exec";
|
||||||
import { normalizeSvgIconName } from "../shared/icon-utils";
|
|
||||||
|
|
||||||
interface WorkflowDesc {
|
interface WorkflowDesc {
|
||||||
folder: string;
|
folder: string;
|
||||||
@@ -59,10 +58,6 @@ async function checkWorkflows(
|
|||||||
`${workflowId}.properties.json`
|
`${workflowId}.properties.json`
|
||||||
));
|
));
|
||||||
const iconName: string | undefined = workflowProperties["iconName"];
|
const iconName: string | undefined = workflowProperties["iconName"];
|
||||||
const normalizedSvgIconName = normalizeSvgIconName(iconName);
|
|
||||||
if (iconName && !normalizedSvgIconName) {
|
|
||||||
console.warn(`Warning: could not normalize icon "${iconName}" for workflow ${workflowId}, skipping icon sync`);
|
|
||||||
}
|
|
||||||
|
|
||||||
const isPartnerWorkflow = workflowProperties.creator ? partnersSet.has(workflowProperties.creator.toLowerCase()) : false;
|
const isPartnerWorkflow = workflowProperties.creator ? partnersSet.has(workflowProperties.creator.toLowerCase()) : false;
|
||||||
|
|
||||||
@@ -75,9 +70,9 @@ async function checkWorkflows(
|
|||||||
folder,
|
folder,
|
||||||
id: workflowId,
|
id: workflowId,
|
||||||
fileExtension,
|
fileExtension,
|
||||||
iconName: normalizedSvgIconName,
|
iconName,
|
||||||
iconType:
|
iconType:
|
||||||
normalizedSvgIconName && normalizedSvgIconName.startsWith("octicon") ? "octicon" : "svg",
|
iconName && iconName.startsWith("octicon") ? "octicon" : "svg",
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!enabled) {
|
if (!enabled) {
|
||||||
@@ -196,13 +191,8 @@ async function checkWorkflow(
|
|||||||
r.push(join(x.folder, "properties", `${x.id}.properties.json`));
|
r.push(join(x.folder, "properties", `${x.id}.properties.json`));
|
||||||
};
|
};
|
||||||
|
|
||||||
if (x.iconType === "svg" && x.iconName) {
|
if (x.iconType === "svg") {
|
||||||
r.push(
|
r.push(join("../../icons", `${x.iconName}.svg`));
|
||||||
join(
|
|
||||||
"../../icons",
|
|
||||||
`${x.iconName}.svg`
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import { safeLoad } from "js-yaml";
|
|||||||
import { basename, extname, join, dirname } from "path";
|
import { basename, extname, join, dirname } from "path";
|
||||||
import { Validator as validator } from "jsonschema";
|
import { Validator as validator } from "jsonschema";
|
||||||
import { endGroup, error, info, setFailed, startGroup } from '@actions/core';
|
import { endGroup, error, info, setFailed, startGroup } from '@actions/core';
|
||||||
import { normalizeSvgIconName } from '../shared/icon-utils';
|
|
||||||
|
|
||||||
interface WorkflowWithErrors {
|
interface WorkflowWithErrors {
|
||||||
id: string;
|
id: string;
|
||||||
@@ -129,16 +128,10 @@ async function checkWorkflow(workflowPath: string, propertiesPath: string, allow
|
|||||||
|
|
||||||
if (properties.iconName) {
|
if (properties.iconName) {
|
||||||
if(! /^octicon\s+/.test(properties.iconName)) {
|
if(! /^octicon\s+/.test(properties.iconName)) {
|
||||||
const svgIconName = normalizeSvgIconName(properties.iconName);
|
try {
|
||||||
|
await fs.access(`../../icons/${properties.iconName}.svg`)
|
||||||
if(!svgIconName) {
|
} catch (e) {
|
||||||
workflowErrors.errors.push(`No icon named ${properties.iconName} found`)
|
workflowErrors.errors.push(`No icon named ${properties.iconName} found`)
|
||||||
} else {
|
|
||||||
try {
|
|
||||||
await fs.access(`../../icons/${svgIconName}.svg`)
|
|
||||||
} catch (e) {
|
|
||||||
workflowErrors.errors.push(`No icon named ${properties.iconName} found`)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||