Skip to content

Commit

Permalink
refactor: card schema
Browse files Browse the repository at this point in the history
  • Loading branch information
gor918 committed Feb 8, 2024
1 parent caf4a01 commit 8417c69
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
4 changes: 2 additions & 2 deletions dist/index.js

Large diffs are not rendered by default.

19 changes: 18 additions & 1 deletion src/message-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,24 @@ export function createMessageCard(
// },
// ],
// };

const { title, creator, description, createdUtc, viewUrl, properties } = {
title: 'Publish Adaptive Card Schema',
description:
'Now that we have defined the main rules and features of the format, we need to produce a schema and publish it to GitHub. The schema will be the starting point of our reference documentation.',
creator: {
name: 'Matt Hidinger',
profileImage: 'https://pbs.twimg.com/profile_images/3647943215/d7f12830b3c17a5a9e4afcc370e3a37e_400x400.jpeg',
},
createdUtc: '2017-02-14T06:08:39Z',
viewUrl: 'https://adaptivecards.io',
properties: [
{ key: 'Board', value: 'Adaptive Cards' },
{ key: 'List', value: 'Backlog' },
{ key: 'Assigned to', value: 'Matt Hidinger' },
{ key: 'Due date', value: 'Not set' },
],
};
const messageCard = {
type: 'AdaptiveCard',
body: [
Expand Down Expand Up @@ -233,6 +251,5 @@ export function createMessageCard(
$schema: 'http://adaptivecards.io/schemas/adaptive-card.json',
version: '1.5',
};

return messageCard;
}

0 comments on commit 8417c69

Please sign in to comment.