Skip to content

Add compact message mode to MS Teams integration#148

Open
Copilot wants to merge 5 commits intomainfrom
copilot/shorten-ms-teams-message
Open

Add compact message mode to MS Teams integration#148
Copilot wants to merge 5 commits intomainfrom
copilot/shorten-ms-teams-message

Conversation

Copy link

Copilot AI commented Feb 2, 2026

Adds optional compact_message setting to MS Teams integration (v3 and v4) to reduce noise by showing only alert title, status, and user in the color-coded box.

Changes

Models (v3.rb, v4.rb)

  • Added compact_message boolean option (default: false)
  • Refactored message builders:
    • v4: _compact_body() / _full_body() for Adaptive Card body structure
    • v3: _compact_facts() / _full_facts() for MessageCard facts array
  • Compact mode removes: urgency, created timestamp, source, destinations, description, additional data

Views

  • Added compact_message checkbox to form options
  • Added option display to show views

Tests

  • Added test cases verifying compact mode renders only 2 facts (Status, User)
  • Existing tests verify default full mode behavior unchanged

Example output (v4 Adaptive Card):

# Compact mode
{
  type: "Container",
  backgroundImage: "https://pagertree.com/assets/img/icon/yellow-square.png",
  items: [
    { type: "TextBlock", text: "Alert #22 Production DB Down" },
    { type: "FactSet", facts: [
      { title: "Status:", value: "ACKNOWLEDGED" },
      { title: "User:", value: "Jane Doe" }
    ]}
  ]
}

Color coding preserved. Backward compatible.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits February 2, 2026 19:03
Co-authored-by: armiiller <9020194+armiiller@users.noreply.github.com>
Co-authored-by: armiiller <9020194+armiiller@users.noreply.github.com>
Copilot AI changed the title [WIP] Add option to shorten MS Teams integration message Add compact message mode to MS Teams integration Feb 2, 2026
Copilot AI requested a review from armiiller February 2, 2026 19:08
@armiiller armiiller marked this pull request as ready for review February 4, 2026 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants