Skip to content

Commit

Permalink
Make use of icons within repo
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonScholz committed Sep 22, 2023
1 parent bdb6081 commit 3a57012
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 22 deletions.
2 changes: 1 addition & 1 deletion badges/coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 10 additions & 8 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions src/cardSection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ import {
StatusMessageKey
} from './statusIndication'

const gitHubIconUrl =
'https://raw.githubusercontent.com/SimonScholz/google-chat-action/main/assets/github-128.webp'
const gitBranchIconUrl =
'https://raw.githubusercontent.com/SimonScholz/google-chat-action/main/assets/git-branch-128.webp'

export function createCardV2Section(): object[] {
const additionalSections = core.getInput('additionalSections')
const additionalSectionsJson = JSON.parse(additionalSections)
Expand Down Expand Up @@ -54,8 +59,7 @@ export function createDefaultCardV2Section(): object[] {
{
text: 'Go to repo',
icon: {
iconUrl:
'https://cdn1.iconfinder.com/data/icons/picons-social/57/github-128.png'
iconUrl: gitHubIconUrl
},
onClick: {
openLink: {
Expand All @@ -81,8 +85,7 @@ export function createDefaultCardV2Section(): object[] {
buttonArray.push({
text: 'Go to commit',
icon: {
iconUrl:
'https://cdn0.iconfinder.com/data/icons/octicons/1024/git-branch-128.png'
iconUrl: gitBranchIconUrl
},
onClick: {
openLink: {
Expand All @@ -95,8 +98,7 @@ export function createDefaultCardV2Section(): object[] {
buttonArray.push({
text: 'Go to pull request',
icon: {
iconUrl:
'https://cdn0.iconfinder.com/data/icons/octicons/1024/git-branch-128.png'
iconUrl: gitBranchIconUrl
},
onClick: {
openLink: {
Expand All @@ -110,17 +112,15 @@ export function createDefaultCardV2Section(): object[] {
{
decoratedText: {
startIcon: {
iconUrl:
'https://cdn1.iconfinder.com/data/icons/picons-social/57/github-128.png'
iconUrl: gitHubIconUrl
},
text: repoPath
}
},
{
decoratedText: {
startIcon: {
iconUrl:
'https://cdn0.iconfinder.com/data/icons/octicons/1024/git-branch-128.png'
iconUrl: gitBranchIconUrl
},
text: github.context.ref
}
Expand Down
6 changes: 3 additions & 3 deletions src/statusIndication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ export const statusColor = {

export const statusImage = {
success:
'https://cdn4.iconfinder.com/data/icons/web-ui-color/128/Checkmark-128.png',
'https://raw.githubusercontent.com/SimonScholz/google-chat-action/main/assets/success-128.webp',
cancelled:
'https://cdn4.iconfinder.com/data/icons/the-weather-is-nice-today/64/weather_48-128.png',
'https://raw.githubusercontent.com/SimonScholz/google-chat-action/main/assets/cancelled-128.webp',
failure:
'https://cdn2.iconfinder.com/data/icons/kids/128x128/apps/agt_action_fail.png'
'https://raw.githubusercontent.com/SimonScholz/google-chat-action/main/assets/failure-128.webp'
}

export const statusMessage = {
Expand Down

0 comments on commit 3a57012

Please sign in to comment.