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
Binary file added assets/GitHub-Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 1 addition & 52 deletions dist/index.js

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

53 changes: 1 addition & 52 deletions src/teams.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

Check failure on line 1 in src/teams.js

View workflow job for this annotation

GitHub Actions / Lint Codebase

Delete `⏎⏎`

const github = require('@actions/github');
const core = require('@actions/core');
Expand All @@ -6,21 +6,21 @@
const { URL } = require('url');

const colors = {
success: '#2cbe4e',

Check failure on line 9 in src/teams.js

View workflow job for this annotation

GitHub Actions / Lint Codebase

Delete `··`
failure: '#ff0000',

Check failure on line 10 in src/teams.js

View workflow job for this annotation

GitHub Actions / Lint Codebase

Replace `····` with `··`
other: '#ffc107'

Check failure on line 11 in src/teams.js

View workflow job for this annotation

GitHub Actions / Lint Codebase

Replace `····` with `··`
};

const events = {
pull_request: 'pull_request',

Check failure on line 15 in src/teams.js

View workflow job for this annotation

GitHub Actions / Lint Codebase

Delete `··`
push: 'push',

Check failure on line 16 in src/teams.js

View workflow job for this annotation

GitHub Actions / Lint Codebase

Delete `··`
workflow_dispatch: 'workflow_dispatch'

Check failure on line 17 in src/teams.js

View workflow job for this annotation

GitHub Actions / Lint Codebase

Delete `··`
};

async function run() {
try {

Check failure on line 21 in src/teams.js

View workflow job for this annotation

GitHub Actions / Lint Codebase

Delete `··`
const name = core.getInput('name', { required: true });

Check failure on line 22 in src/teams.js

View workflow job for this annotation

GitHub Actions / Lint Codebase

Replace `········` with `····`
const webhookUrl = core.getInput('url', { required: true });

Check failure on line 23 in src/teams.js

View workflow job for this annotation

GitHub Actions / Lint Codebase

Replace `········` with `····`
const status = core.getInput('status', { required: true });
const artifactUrl = core.getInput('artifactUrl') || '—';
const boardName = core.getInput('jiraBoardName');
Expand Down Expand Up @@ -118,57 +118,6 @@

}



// const payload = JSON.stringify({
// type: "message",
// attachments: [
// {
// contentType: "application/vnd.microsoft.card.adaptive",
// content: {
// $schema: "http://adaptivecards.io/schemas/adaptive-card.json",
// type: "AdaptiveCard",
// version: "1.4",
// body: [
// {
// type: "TextBlock",
// text: `${emoji} Build Notification`,
// weight: "Bolder",
// size: "Medium"
// },
// {
// type: "FactSet",
// facts: [
// { title: "Progetto:", value: project },
// { title: "Branch:", value: branch },
// { title: "Stato:", value: `${emoji} ${status}` }
// ]
// },
// {
// type: "TextBlock",
// text: "📎 Artifact URL:",
// weight: "Bolder",
// spacing: "Medium"
// },
// {
// type: "TextBlock",
// text: artifactUrl,
// wrap: true,
// selectable: true
// }
// ],
// actions: [
// {
// type: "Action.OpenUrl",
// title: "🔗 Apri Artifact",
// url: artifactUrl
// }
// ]
// }
// }
// ]
// });

const eventType = events[(eventName || '').toLowerCase()] || events.push;
let eventNameFmt;
if (eventType === events.pull_request) {
Expand Down Expand Up @@ -209,7 +158,7 @@
"items": [
{
"type": "Image",
"url": "https://github.githubassets.com/assets/github.svg",
"url": "https://raw.githubusercontent.com/ctinnovation/google-chat-github-action/main/assets/GitHub-Logo.png",
"width": "50px"
}
],
Expand Down Expand Up @@ -500,7 +449,7 @@
"type": "Action.ToggleVisibility",
"targetElements": ["extrainfo"]
}
},

Check failure on line 452 in src/teams.js

View workflow job for this annotation

GitHub Actions / Check dist/

Expected property shorthand

]
}
Expand Down
Loading