Skip to content

Commit

Permalink
Restore folder icon for pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
janfaracik committed Mar 9, 2024
1 parent 4e6b63e commit e0ad7a7
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class GitHubRepoMetadataAction extends AvatarMetadataAction {
/** {@inheritDoc} */
@Override
public String getAvatarIconClassName() {
return "symbol-logo-github plugin-ionicons-api";
return "icon-github-repo";
}

/** {@inheritDoc} */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
import net.jcip.annotations.GuardedBy;
import org.apache.commons.lang.StringUtils;
import org.jenkins.ui.icon.Icon;
import org.jenkins.ui.icon.IconFormat;
import org.jenkins.ui.icon.IconSet;
import org.jenkins.ui.icon.IconSpec;
import org.jenkinsci.Symbol;
Expand Down Expand Up @@ -1911,6 +1912,27 @@ public List<SCMTrait<? extends SCMTrait<?>>> getTraitsDefaults() {
"icon-github-scm-navigator icon-xlg",
"plugin/github-branch-source/images/svgs/github-scmnavigator.svg",
Icon.ICON_XLARGE_STYLE));

IconSet.icons.addIcon(new Icon(
"icon-github-repo icon-sm",
"plugin/github-branch-source/images/svgs/sprite-github.svg#github-repo",
Icon.ICON_SMALL_STYLE,
IconFormat.EXTERNAL_SVG_SPRITE));
IconSet.icons.addIcon(new Icon(
"icon-github-repo icon-md",
"plugin/github-branch-source/images/svgs/sprite-github.svg#github-repo",
Icon.ICON_MEDIUM_STYLE,
IconFormat.EXTERNAL_SVG_SPRITE));
IconSet.icons.addIcon(new Icon(
"icon-github-repo icon-lg",
"plugin/github-branch-source/images/svgs/sprite-github.svg#github-repo",
Icon.ICON_LARGE_STYLE,
IconFormat.EXTERNAL_SVG_SPRITE));
IconSet.icons.addIcon(new Icon(
"icon-github-repo icon-xlg",
"plugin/github-branch-source/images/svgs/sprite-github.svg#github-repo",
Icon.ICON_XLARGE_STYLE,
IconFormat.EXTERNAL_SVG_SPRITE));
}
}

Expand Down
7 changes: 7 additions & 0 deletions src/main/webapp/images/svgs/sprite-github.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ public void fetchActions() throws Exception {
Matchers.is(
new ObjectMetadataAction("CloudBeers, Inc.", null, "https://github.com/cloudbeers")),
Matchers.is(new GitHubOrgMetadataAction((String) null)),
Matchers.is(new GitHubLink("icon-github-logo", "https://github.com/cloudbeers"))));
Matchers.is(new GitHubLink("https://github.com/cloudbeers"))));
}

@Test
Expand Down

0 comments on commit e0ad7a7

Please sign in to comment.