Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 14 additions & 11 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
# Dependabot configuration:
# https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2

multi-ecosystem-groups:
plugin-dependencies:
target-branch: "dev"
schedule:
interval: "weekly"

updates:
# Maintain dependencies for Gradle dependencies
- package-ecosystem: "gradle"
directory: "/"
target-branch: "main"
schedule:
interval: "weekly"
# Maintain dependencies for GitHub Actions
patterns:
- "*"
multi-ecosystem-group: "plugin-dependencies"

- package-ecosystem: "github-actions"
directory: "/"
target-branch: "main"
schedule:
interval: "weekly"
patterns:
- "*"
multi-ecosystem-group: "plugin-dependencies"
28 changes: 18 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
inputs:
tag:
description: Release tag. Empty means today's vYYYY.M.D.
description: Release tag. Empty means today's YYYY.M.D.
required: false
type: string
dry_run:
Expand Down Expand Up @@ -81,20 +81,25 @@ jobs:
release_tag=""
target_version="$plugin_version"
if [ "$release" = "true" ]; then
if [ -n "$INPUT_TAG" ]; then
release_tag="$INPUT_TAG"
input_tag="$INPUT_TAG"
case "$input_tag" in
v*) input_tag="${input_tag#v}" ;;
esac

if [ -n "$input_tag" ]; then
release_tag="$input_tag"
else
year="$(date -u +%Y)"
month="$(date -u +%m | sed 's/^0//')"
day="$(date -u +%d | sed 's/^0//')"
release_tag="v$year.$month.$day"
release_tag="$year.$month.$day"
fi

if ! printf '%s\n' "$release_tag" | grep -Eq '^v[0-9]{4}[.][1-9][0-9]?[.][1-9][0-9]?$'; then
echo "Tag must look like v2026.5.20: $release_tag" >&2
if ! printf '%s\n' "$release_tag" | grep -Eq '^[0-9]{4}[.][1-9][0-9]?[.][1-9][0-9]?$'; then
echo "Tag must look like 2026.5.20: $release_tag" >&2
exit 1
fi
target_version="${release_tag#v}"
target_version="$release_tag"
fi

echo "event=$GITHUB_EVENT_NAME"
Expand Down Expand Up @@ -124,7 +129,7 @@ jobs:

- name: ♻️ Restore cache
id: cache
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
with:
path: |
~/.gradle/caches/transforms-*
Expand Down Expand Up @@ -254,7 +259,10 @@ jobs:
env:
RELEASE_TAG: ${{ steps.plan.outputs.tag }}
run: |
version="${RELEASE_TAG#v}"
version="$RELEASE_TAG"
case "$version" in
v*) version="${version#v}" ;;
esac
awk -v version="$version" '
$0 ~ "^## \\[" version "\\]" { found = 1; next }
found && $0 ~ /^## / { exit }
Expand Down Expand Up @@ -338,7 +346,7 @@ jobs:
- name: 💾 Save cache
if: success() && github.event_name != 'pull_request' && steps.cache.outputs.cache-hit != 'true'
continue-on-error: true
uses: actions/cache/save@v4
uses: actions/cache/save@v5
with:
path: |
~/.gradle/caches/transforms-*
Expand Down
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,27 @@

## [Unreleased]

### Plugin Wiring

- Simplified workflow syntax routing for completion, highlighting, references, and documentation.
- Reduced duplicated workflow run, action cache, and schema handling internals while keeping behavior stable.
- Reorganized plugin internals into fewer `Workflow*` service entry points, with public service Javadocs where humans
might actually read them.
- Added the plugin size refactor plan and documented the release/changelog flow.
- Release automation now uses plain date tags, avoids duplicated Marketplace change-note headings, and groups Dependabot
dependency updates into one weekly PR against `dev`.
- Updated the IntelliJ test platform, JaCoCo, and GitHub Actions cache action to current stable metadata.
- Fixed the README build badge link and refreshed navigation/release docs.
- `.gitea/workflows/*` files now get their own light/dark Gitea-flavored file icon instead of cosplaying GitHub.

## [2026.5.29] - 2026-05-29

### Release Polish

- Marketplace change notes skip the duplicated version heading.
- Future GitHub release tags use plain date versions without a leading `v`.
- Dependabot dependency bumps are grouped into one weekly cross-ecosystem PR against `dev`.

## [2026.5.23] - 2026-05-23

### Fresh Start
Expand Down
33 changes: 16 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

*Your Ultimate Wingman for GitHub Workflows and Actions! 🚀*

![Build](https://github.com/YunaBraska/github-workflow-plugin/workflows/Build/badge.svg)
[![Build](https://github.com/YunaBraska/github-workflow-plugin/actions/workflows/build.yml/badge.svg)](https://github.com/YunaBraska/github-workflow-plugin/actions/workflows/build.yml)
[![Version](https://img.shields.io/jetbrains/plugin/v/21396-github-workflow.svg)](https://plugins.jetbrains.com/plugin/21396-github-workflow)
[![Downloads](https://img.shields.io/jetbrains/plugin/d/21396-github-workflow.svg)](https://plugins.jetbrains.com/plugin/21396-github-workflow)
[![](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/YunaBraska)
Expand Down Expand Up @@ -79,25 +79,24 @@ Plugin downloads the IDE, bundled plugins, verifier, and test runtime.

## Release Automation

One GitHub Actions workflow runs for branch pushes, PRs, and manual dispatches. It has one job and one cache. Branch and
PR runs do the normal test/package pass. A merge to `main`, or a manual workflow run, prepares the date-based version,
runs the full checks and Plugin Verifier, publishes the plugin ZIP to GitHub Packages, uploads the same ZIP to
JetBrains Marketplace, pushes the release commit and tag, and creates the GitHub release.
One workflow handles tagging, packaging, GitHub Packages, Marketplace publishing, changelog notes, and GitHub releases.
It intentionally uses one job and one cache because the IntelliJ build/test setup can eat roughly 10 GB; repeating that
across jobs is how CI becomes a very expensive space heater.

The workflow prunes old GitHub Actions caches after a successful non-PR run so only the current pipeline cache remains.
Flow:

Required repository secrets:
1. Branch pushes and PRs run tests and build the plugin ZIP.
2. A merge to `main`, or a manual workflow run, switches the same job into release mode.
3. The job computes a plain date tag such as `2026.5.29` and updates `pluginVersion`.
4. It creates the matching `CHANGELOG.md` section from `## [Unreleased]` when needed.
5. It runs `check`, Plugin Verifier, and `buildPlugin`.
6. It publishes the ZIP to GitHub Packages, then uploads the same ZIP to JetBrains Marketplace.
7. Only after publishing succeeds, it pushes the release commit and tag, then creates or updates the GitHub release.
8. A successful non-PR run saves the current cache and prunes older GitHub Actions caches.

* `PUBLISH_TOKEN`

Optional repository secret:

* `RELEASE_TOKEN` - lets the workflow push the release commit and tag with a dedicated token. Without it, `GITHUB_TOKEN`
is used.

Optional repository variable:

* `MARKETPLACE_CHANNEL` - empty means the default stable Marketplace channel.
`PUBLISH_TOKEN` is required for Marketplace upload. `RELEASE_TOKEN` is optional; without it, the workflow uses
`GITHUB_TOKEN` for the release commit, tag, and GitHub release. `MARKETPLACE_CHANNEL` is optional and empty means the
stable channel.

For manual IDE testing, run `./gradlew runIde`. The default target tracks the latest stable IntelliJ IDEA platform that
the Gradle tooling can resolve (`platformVersion` in `gradle.properties`). The first run downloads IDE artifacts and can
Expand Down
7 changes: 4 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ tasks.register('generateGitHubDocsData') {
}

jacoco {
toolVersion = '0.8.13'
toolVersion = '0.8.15'
}

jacocoTestReport {
Expand All @@ -261,8 +261,9 @@ intellijPlatform {
name = requiredProperty('pluginName')
version = requiredProperty('pluginVersion')
description = requiredProperty('pluginDescription')
changeNotes = provider {
changelog.renderItem(changelog.getLatest(), Changelog.OutputType.HTML)
changeNotes = providers.gradleProperty('pluginVersion').map { pluginVersion ->
def item = changelog.has(pluginVersion) ? changelog.get(pluginVersion) : changelog.getLatest()
changelog.renderItem(item.withHeader(false).withEmptySections(false), Changelog.OutputType.HTML)
}

ideaVersion {
Expand Down
9 changes: 5 additions & 4 deletions doc/adr/0011-release-once-publish-zip.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,18 @@ out.

## Decision

Use one workflow file with one job and one manually managed cache key.
Use one workflow file with one job and one manually managed cache key. IntelliJ test and verifier setup is large enough
that splitting the same release path across jobs duplicates heavyweight downloads and cache state.

The same job handles all modes:

- branch and PR runs execute the normal test/package path;
- a `main` push that is not the generated release commit executes the release path;
- a manual dispatch executes the release path, with optional dry-run support.

The release path prepares the version, runs the full checks and Plugin Verifier, publishes the plugin ZIP to GitHub
Packages, uploads the same ZIP directly to JetBrains Marketplace, pushes the release commit and tag, and creates or
updates the GitHub release.
The release path prepares the version and changelog, runs the full checks and Plugin Verifier, publishes the plugin ZIP
to GitHub Packages, uploads the same ZIP directly to JetBrains Marketplace, then pushes the release commit/tag and
creates or updates the GitHub release.

After a successful non-PR run, the job prunes every GitHub Actions cache entry except the current pipeline cache key.

Expand Down
29 changes: 18 additions & 11 deletions doc/navigation.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,28 @@ The plugin is intentionally plain Java with Gradle wrapper entrypoints. The usef

## Runtime Entry Points

- `CodeCompletion` handles workflow expressions, `uses`, `with`, secrets, shell values, local files, remote action refs,
and GitHub context/default environment completions.
- `HighlightAnnotator` handles editor diagnostics, symbol coloring, quick fixes, action update suggestions, and
- `WorkflowLocation.from(PsiElement)` is the shared PSI/YAML location for workflow keys, paths, files, repositories,
and branches.
- `WorkflowSyntax` owns workflow syntax completions, validation metadata, JSON schema hookup, file icons, and `run`
language injection.
- `WorkflowReferences` owns local PSI references, remote web references, and expression reference targets.
- `GitHubActionCache` is the cache boundary for action/reusable-workflow metadata, cache actions, warning restore, and
startup refresh.
- `WorkflowRun` is the remote workflow-run boundary: dispatch, cancel, rerun, delete, jobs, logs, artifacts, and branch
resolution.
- `WorkflowCompletion` handles workflow expressions, `uses`, `with`, secrets, shell values, local files, remote action refs,
and GitHub context/default environment completions through `WorkflowSyntax`, `WorkflowLocation`, and
`GitHubActionCache`.
- `WorkflowAnnotator` handles editor diagnostics, symbol coloring, quick fixes, action update suggestions, and
variable/run output highlighting.
- `ReferenceContributor` handles local PSI references and remote web references.
- `WorkflowDocumentationProvider` handles hover and quick documentation.
- `WorkflowRunLanguageInjector` injects shell-like languages into `run` blocks based on `shell`.
- `WorkflowRunConfigurationType` and related workflow-run classes handle workflow dispatch from the IDE Run tool window.
- `GitHubRequestAuthorizations` centralizes GitHub account, optional token-env fallback, and anonymous request ordering.
- `GitHubActionCache`, `RemoteActionProviders`, and `RemoteServerSettings` resolve and cache local/remote action and
reusable workflow metadata.
- `RemoteActionProviders` centralizes GitHub account, enterprise account, optional token-env fallback, anonymous request
ordering, and remote server settings.
- `WorkflowRunConfiguration` handles workflow dispatch from the IDE Run tool window.
- `GitHubWorkflowSettingsConfigurable` exposes the plugin settings page for language override, cache review/delete,
cache import/export, plugin cache size, and the tiny support button with suspicious amounts of caffeine energy.
- `WorkflowRunLogRenderer` compacts GitHub Actions logs into named blocks with `0001 |` line numbers, `run:` command
lines, ANSI cleanup, and warning/error classification for Run tool-window job consoles.
- `WorkflowRunView.LogRenderer` compacts GitHub Actions logs into named blocks with `0001 |` line numbers,
`run:` command lines, ANSI cleanup, and warning/error classification for Run tool-window job consoles.

## Tests

Expand Down
63 changes: 63 additions & 0 deletions doc/spec/plugin-size-refactor-plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Plugin Size Refactor Plan

## Goal

Reduce plugin size and production-code duplication while keeping the current feature set and public behavior covered by
tests.

This is not a feature rollback. The target is a smaller, calmer implementation: same teeth, less boilerplate jaw.

## Marketplace Baseline

| Version | Status | Date | Compatibility Range | Size | Uploaded By |
| --- | --- | --- | --- | --- | --- |
| 2025.0.0 | Approved | 21 Apr 2025 | 251.0+ | 150.58 KB | Yuna Morgenstern |
| 2026.5.23 | Under review | 23 May 2026 | 242.0+ | 620.83 KB | Yuna Morgenstern |

## Current Local Size Shape

The 2026 line grew for real reasons: workflow run UI, broader completion/highlighting/validation, remote metadata, cache
controls, and top-20 localization.

The largest cleanup candidates are:

- Completion, validation, documentation, highlighting, and references each walk similar workflow structure.
- `WorkflowCompletion` and `WorkflowRunView` are large coordination classes.
- Resource bundles repeat many full strings across all locale files.
- Workflow syntax metadata is split across schemas, generated docs snapshots, hard-coded maps, and local presentation
code.

## Refactor Direction

1. Build one immutable `WorkflowModel` from the YAML PSI.
2. Feed completion, validation, references, hover docs, line markers, and highlighting from that model.
3. Move workflow syntax keys, values, descriptions, and validation rules into one data-driven registry.
4. Split workflow run UI into small model, tree state, renderer, toolbar action, and log view classes.
5. Reduce localization duplication by keeping the base bundle authoritative and only overriding translated values.
6. Keep schemas and docs snapshots, but avoid duplicating their meaning in Java maps when generated data can serve it.

## Expected Reduction

Realistic target:

- 25-35% less production Java code.
- 150-250 KB smaller Marketplace artifact if localization and duplicated syntax metadata are cleaned up.
- Final artifact target: 350-450 KB while keeping current behavior.

Returning to roughly 150 KB is not realistic without dropping current functionality or broad localization.

## Guardrails

- Keep current tests green.
- Add regression tests before changing shared completion, validation, highlighting, or workflow-run behavior.
- Prefer public editor/runtime entrypoints over private helper tests.
- Do not change user-facing behavior unless the test or spec says the old behavior was wrong.
- No speculative abstractions. If a shared model does not simplify at least two consumers, delete it.

## Done Criteria

- Marketplace artifact size is measured before and after.
- Production Java line count is measured before and after.
- Existing editor and workflow-run tests pass.
- Manual IDE smoke test covers completion, validation, quick fixes, left ruler markers, and workflow run tree.
- Release notes mention user-visible polish only, not internal surgery.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pluginSinceBuild = 242
# Not specifying until-build means it will include all future builds (including unreleased IDE versions, which might impact compatibility later).

# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
platformVersion = 2026.1.2
platformVersion = 2026.1.3

pluginUrl=https://github.com/YunaBraska/github-workflow-plugin

Expand Down
Loading