Class: Decidim::Backporter
- Inherits:
-
Object
- Object
- Decidim::Backporter
- Defined in:
- lib/decidim/backporter.rb
Defined Under Namespace
Classes: InvalidMetadataError
Instance Method Summary collapse
-
#call ⇒ void
Handles the different tasks to create a backport: * Gets the metadata of a pull request on GitHub * Appls thi commit to another brach and push it to the remote repository * Creates the pull request on GitHub.
-
#initialize(token:, pull_request_id:, version_number:, exit_with_unstaged_changes:) ⇒ Backporter
constructor
A new instance of Backporter.
Constructor Details
#initialize(token:, pull_request_id:, version_number:, exit_with_unstaged_changes:) ⇒ Backporter
Returns a new instance of Backporter.
11 12 13 14 15 16 |
# File 'lib/decidim/backporter.rb', line 11 def initialize(token:, pull_request_id:, version_number:, exit_with_unstaged_changes:) @token = token @pull_request_id = pull_request_id @version_number = version_number @exit_with_unstaged_changes = exit_with_unstaged_changes end |
Instance Method Details
#call ⇒ void
This method returns an undefined value.
Handles the different tasks to create a backport:
-
Gets the metadata of a pull request on GitHub
-
Appls thi commit to another brach and push it to the remote repository
-
Creates the pull request on GitHub
25 26 27 28 29 30 |
# File 'lib/decidim/backporter.rb', line 25 def call = make_cherrypick_and_branch() create_pull_request() Decidim::GitBackportManager.checkout_develop end |