Skip to main content

post_issue

Function post_issue 

Source
pub async fn post_issue(
    provider: &dyn TokenProvider,
    owner: &str,
    repo: &str,
    title: &str,
    body: &str,
) -> Result<(String, u64)>
Expand description

Posts a formatted issue to GitHub.

This function takes formatted issue content and posts it to GitHub. It is the second step of the two-step issue creation process. Use format_issue() first to format the issue content.

§Arguments

  • provider - Token provider for GitHub credentials
  • owner - Repository owner
  • repo - Repository name
  • title - Formatted issue title
  • body - Formatted issue body

§Returns

Tuple of (issue_url, issue_number).

§Errors

Returns an error if:

  • GitHub token is not available from the provider
  • GitHub API call fails