Dagger
Search

pr-reviewer

This module has been generated via dagger init and serves as a reference to
basic module structure as you get started with Dagger.

Two functions have been pre-created. You can modify, delete, or add to them,
as needed. They demonstrate usage of arguments and return types using simple
echo and grep commands. The functions can be called from the dagger CLI or
from one of the SDKs.

The first line in this comment block is a short description line and the
rest is a long description with more detail on the module's purpose or usage,
if appropriate. All modules should have a short description.

Installation

dagger install github.com/samalba/agents/pr-reviewer@2bde48946e1b2c6308a81121d7d63a93984dfdf2

Entrypoint

Return Type
PrReviewer
Example
dagger -m github.com/samalba/agents/pr-reviewer@2bde48946e1b2c6308a81121d7d63a93984dfdf2 call \
func (m *myModule) example() *PrReviewer  {
	return dag.
			PrReviewer()
}
@function
def example() -> dag.PrReviewer:
	return (
		dag.pr_reviewer()
	)
@func()
example(): PrReviewer {
	return dag
		.prReviewer()
}

Types

PrReviewer 🔗

reviewPr() 🔗

Review a PR, by default it will review the PR description and the diff. Query is any argument supported by the gh cli (gh pr view [ | | ]). Additional instructions can be provided to the LLM to guide the review. Returns the URL of the PR comment created by the LLM

Return Type
String !
Arguments
NameTypeDefault ValueDescription
githubTokenSecret !-No description provided
queryString !-No description provided
repoUrlString !-No description provided
additionalInstructionsString -No description provided
Example
dagger -m github.com/samalba/agents/pr-reviewer@2bde48946e1b2c6308a81121d7d63a93984dfdf2 call \
 review-pr --github-token env:MYSECRET --query string --repo-url string
func (m *myModule) example(ctx context.Context, githubToken *Secret, query string, repoUrl string) string  {
	return dag.
			PrReviewer().
			ReviewPr(ctx, githubToken, query, repoUrl)
}
@function
async def example(github_token: dagger.Secret, query: str, repo_url: str) -> str:
	return await (
		dag.pr_reviewer()
		.review_pr(github_token, query, repo_url)
	)
@func()
async example(githubToken: Secret, query: string, repoUrl: string): Promise<string> {
	return dag
		.prReviewer()
		.reviewPr(githubToken, query, repoUrl)
}