Documentation
¶
Overview ¶
Package github fetches pull request data from GitHub using prx.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchPRData ¶
FetchPRData retrieves pull request information from GitHub and converts it to the format needed for cost calculation.
Parameters:
- ctx: Context for the API call
- prURL: Full GitHub PR URL (e.g., "https://github.com/owner/repo/pull/123")
- token: GitHub authentication token
Returns:
- cost.PRData with all information needed for cost calculation
func FetchPRDataWithDefaults ¶
FetchPRDataWithDefaults is a convenience function that uses environment variables for authentication.
Parameters:
- ctx: Context for the API call
- prURL: Full GitHub PR URL (e.g., "https://github.com/owner/repo/pull/123")
Returns:
- cost.PRData with all information needed for cost calculation
func PRDataFromPRX ¶
func PRDataFromPRX(prData *prx.PullRequestData) cost.PRData
PRDataFromPRX converts prx.PullRequestData to cost.PRData. This allows you to use prcost with pre-fetched PR data.
Parameters:
- prData: PullRequestData from prx package
Returns:
- cost.PRData with all information needed for cost calculation
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.