Class: GithubIntegration::UpgradeHintsSection

Inherits:
Object
  • Object
show all
Defined in:
action/lib/github_integration.rb

Overview

Renders the collapsed "How to update dependencies" section. With structured details it emits concrete swift package update commands (grouped by manifest directory) and the manifest requirement changes needed for out-of-range updates; otherwise it falls back to generic guidance.

Constant Summary collapse

STATIC_GUIDANCE =
<<~MARKDOWN.chomp
  To update your SPM dependencies:
  - **Package.swift**: bump the version constraint and run `swift package update` (or `swift package resolve`)
  - **Xcode project**: go to **File → Packages → Update to Latest Package Versions**, or update individual packages from the Package Dependencies section in the Project Navigator
MARKDOWN

Instance Method Summary collapse

Constructor Details

#initialize(details = nil) ⇒ UpgradeHintsSection

Returns a new instance of UpgradeHintsSection.



113
114
115
# File 'action/lib/github_integration.rb', line 113

def initialize(details = nil)
  @details = Array(details)
end

Instance Method Details

#markdownObject



117
118
119
120
121
122
123
124
125
126
# File 'action/lib/github_integration.rb', line 117

def markdown
  <<~MARKDOWN.chomp
    <details>
    <summary>💡 How to update dependencies</summary>

    #{body}

    </details>
  MARKDOWN
end