Class: Dependabot::PullRequestCreator::MessageBuilder
- Inherits:
-
Object
- Object
- Dependabot::PullRequestCreator::MessageBuilder
- Defined in:
- lib/dependabot/pull_request_creator/message_builder.rb
Constant Summary collapse
- ANGULAR_PREFIXES =
%w(build chore ci docs feat fix perf refactor style test).freeze
- ESLINT_PREFIXES =
%w(Breaking Build Chore Docs Fix New Update Upgrade).freeze
- GITMOJI_PREFIXES =
%w(art zap fire bug ambulance sparkles memo rocket lipstick tada white_check_mark lock apple penguin checkered_flag robot green_apple bookmark rotating_light construction green_heart arrow_down arrow_up pushpin construction_worker chart_with_upwards_trend recycle heavy_minus_sign whale heavy_plus_sign wrench globe_with_meridians pencil2 hankey rewind twisted_rightwards_arrows package alien truck page_facing_up boom bento ok_hand wheelchair bulb beers speech_balloon card_file_box loud_sound mute busts_in_silhouette children_crossing building_construction iphone clown_face egg see_no_evil camera_flash).freeze
- ISSUE_TAG_REGEX =
/(?<=[\s(\\]|^)(?<tag>(?:\#|GH-)\d+)(?=[^A-z0-9\-]|$)/.freeze
- GITHUB_REF_REGEX =
%r{github\.com/[^/\s]+/[^/\s]+/(?:issue|pull)}.freeze
Instance Attribute Summary collapse
-
#author_details ⇒ Object
readonly
Returns the value of attribute author_details.
-
#credentials ⇒ Object
readonly
Returns the value of attribute credentials.
-
#dependencies ⇒ Object
readonly
Returns the value of attribute dependencies.
-
#files ⇒ Object
readonly
Returns the value of attribute files.
-
#pr_message_footer ⇒ Object
readonly
Returns the value of attribute pr_message_footer.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#vulnerabilities_fixed ⇒ Object
readonly
Returns the value of attribute vulnerabilities_fixed.
Instance Method Summary collapse
- #commit_message ⇒ Object
-
#initialize(source:, dependencies:, files:, credentials:, pr_message_footer: nil, author_details: nil, vulnerabilities_fixed: {}) ⇒ MessageBuilder
constructor
A new instance of MessageBuilder.
- #pr_message ⇒ Object
- #pr_name ⇒ Object
Constructor Details
#initialize(source:, dependencies:, files:, credentials:, pr_message_footer: nil, author_details: nil, vulnerabilities_fixed: {}) ⇒ MessageBuilder
Returns a new instance of MessageBuilder.
37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/dependabot/pull_request_creator/message_builder.rb', line 37 def initialize(source:, dependencies:, files:, credentials:, pr_message_footer: nil, author_details: nil, vulnerabilities_fixed: {}) @dependencies = dependencies @files = files @source = source @credentials = credentials = = @vulnerabilities_fixed = vulnerabilities_fixed end |
Instance Attribute Details
#author_details ⇒ Object (readonly)
Returns the value of attribute author_details.
34 35 36 |
# File 'lib/dependabot/pull_request_creator/message_builder.rb', line 34 def end |
#credentials ⇒ Object (readonly)
Returns the value of attribute credentials.
34 35 36 |
# File 'lib/dependabot/pull_request_creator/message_builder.rb', line 34 def credentials @credentials end |
#dependencies ⇒ Object (readonly)
Returns the value of attribute dependencies.
34 35 36 |
# File 'lib/dependabot/pull_request_creator/message_builder.rb', line 34 def dependencies @dependencies end |
#files ⇒ Object (readonly)
Returns the value of attribute files.
34 35 36 |
# File 'lib/dependabot/pull_request_creator/message_builder.rb', line 34 def files @files end |
#pr_message_footer ⇒ Object (readonly)
Returns the value of attribute pr_message_footer.
34 35 36 |
# File 'lib/dependabot/pull_request_creator/message_builder.rb', line 34 def end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
34 35 36 |
# File 'lib/dependabot/pull_request_creator/message_builder.rb', line 34 def source @source end |
#vulnerabilities_fixed ⇒ Object (readonly)
Returns the value of attribute vulnerabilities_fixed.
34 35 36 |
# File 'lib/dependabot/pull_request_creator/message_builder.rb', line 34 def vulnerabilities_fixed @vulnerabilities_fixed end |
Instance Method Details
#commit_message ⇒ Object
59 60 61 62 63 64 65 |
# File 'lib/dependabot/pull_request_creator/message_builder.rb', line 59 def = commit_subject + "\n\n" += += += "\n\n" + if end |
#pr_message ⇒ Object
55 56 57 |
# File 'lib/dependabot/pull_request_creator/message_builder.rb', line 55 def + + end |
#pr_name ⇒ Object
49 50 51 52 53 |
# File 'lib/dependabot/pull_request_creator/message_builder.rb', line 49 def pr_name return library_pr_name if library? application_pr_name end |