Skip to content

Return the created PR URL #49

@ryz310

Description

@ryz310

Currently, PrComet.create! returns true if the PR is successfully created.
But I want to know the URL of the created PR.
The method should return the URL instead of true value.

pr_comet/lib/pr_comet.rb

Lines 72 to 83 in 42001bd

def create!(**options)
options[:validate] = true if options[:validate].nil?
return false if options[:validate] && !git_condition_valid?
git.push(github_token_url, topic_branch)
pr_number = github.create_pull_request(generate_create_pr_options(options))
github.add_labels(pr_number, *options[:labels]) unless options[:labels].nil?
unless options[:project_column_name].nil?
github.add_to_project(pr_number, generate_add_to_project_options(options))
end
true
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions