Dagger
Search

github-issue

A generated module for GithubIssue functions

Installation

dagger install github.com/kpenfound/dag/github-issue@7cf4101972d47d1d8e83ce98d9a2f8a5f576dff0

Entrypoint

Return Type
GithubIssue !
Arguments
NameTypeDefault ValueDescription
tokenSecret !-Github authentication token
Example
dagger -m github.com/kpenfound/dag/github-issue@7cf4101972d47d1d8e83ce98d9a2f8a5f576dff0 call \
 --token env:MYSECRET
func (m *myModule) example(token *Secret) *GithubIssue  {
	return dag.
			GithubIssue(token)
}
@function
def example(token: dagger.Secret) -> dag.GithubIssue:
	return (
		dag.github_issue(token)
	)
@func()
example(token: Secret): GithubIssue {
	return dag
		.githubIssue(token)
}

Types

GithubIssue 🔗

read() 🔗

Read a Github issue from a repository

Return Type
GithubIssueData !
Arguments
NameTypeDefault ValueDescription
repoString !-Github repo, e.g https://github.com/owner/repo
issueIdInteger !-Issue title
Example
dagger -m github.com/kpenfound/dag/github-issue@7cf4101972d47d1d8e83ce98d9a2f8a5f576dff0 call \
 --token env:MYSECRET read --repo string --issue-id integer
func (m *myModule) example(token *Secret, repo string, issueId int) *GithubIssueData  {
	return dag.
			GithubIssue(token).
			Read(repo, issueId)
}
@function
def example(token: dagger.Secret, repo: str, issue_id: int) -> dag.GithubIssueData:
	return (
		dag.github_issue(token)
		.read(repo, issue_id)
	)
@func()
example(token: Secret, repo: string, issueId: number): GithubIssueData {
	return dag
		.githubIssue(token)
		.read(repo, issueId)
}

write() 🔗

Create a github issue in a repository

Return Type
GithubIssueData !
Arguments
NameTypeDefault ValueDescription
repoString !-Github repo, e.g https://github.com/owner/repo
titleString !-Issue title
bodyString !-Issue body
Example
dagger -m github.com/kpenfound/dag/github-issue@7cf4101972d47d1d8e83ce98d9a2f8a5f576dff0 call \
 --token env:MYSECRET write --repo string --title string --body string
func (m *myModule) example(token *Secret, repo string, title string, body string) *GithubIssueData  {
	return dag.
			GithubIssue(token).
			Write(repo, title, body)
}
@function
def example(token: dagger.Secret, repo: str, title: str, body: str) -> dag.GithubIssueData:
	return (
		dag.github_issue(token)
		.write(repo, title, body)
	)
@func()
example(token: Secret, repo: string, title: string, body: string): GithubIssueData {
	return dag
		.githubIssue(token)
		.write(repo, title, body)
}

writeComment() 🔗

Write a comment on a Github issue

Return Type
Void !
Arguments
NameTypeDefault ValueDescription
repoString !-Github repo, e.g https://github.com/owner/repo
issueIdInteger !-Issue or Pull Request number
bodyString !-Comment body
Example
dagger -m github.com/kpenfound/dag/github-issue@7cf4101972d47d1d8e83ce98d9a2f8a5f576dff0 call \
 --token env:MYSECRET write-comment --repo string --issue-id integer --body string
func (m *myModule) example(ctx context.Context, token *Secret, repo string, issueId int, body string)   {
	return dag.
			GithubIssue(token).
			WriteComment(ctx, repo, issueId, body)
}
@function
async def example(token: dagger.Secret, repo: str, issue_id: int, body: str) -> None:
	return await (
		dag.github_issue(token)
		.write_comment(repo, issue_id, body)
	)
@func()
async example(token: Secret, repo: string, issueId: number, body: string): Promise<void> {
	return dag
		.githubIssue(token)
		.writeComment(repo, issueId, body)
}

writePullRequestCodeComment() 🔗

Write a code suggestion on a Github pull request

Return Type
Void !
Arguments
NameTypeDefault ValueDescription
repoString !-Github repo, e.g https://github.com/owner/repo
issueIdInteger !-Pull request number
commitString !-Git commit sha
bodyString !-Comment body, e.g. the suggestion
pathString !-File to suggest a change on
sideString !-Side of the diff to suggest a change on
lineInteger !-Line number to suggest a change on
Example
dagger -m github.com/kpenfound/dag/github-issue@7cf4101972d47d1d8e83ce98d9a2f8a5f576dff0 call \
 --token env:MYSECRET write-pull-request-code-comment --repo string --issue-id integer --commit string --body string --path string --side string --line integer
func (m *myModule) example(ctx context.Context, token *Secret, repo string, issueId int, commit string, body string, path string, side string, line int)   {
	return dag.
			GithubIssue(token).
			WritePullRequestCodeComment(ctx, repo, issueId, commit, body, path, side, line)
}
@function
async def example(token: dagger.Secret, repo: str, issue_id: int, commit: str, body: str, path: str, side: str, line: int) -> None:
	return await (
		dag.github_issue(token)
		.write_pull_request_code_comment(repo, issue_id, commit, body, path, side, line)
	)
@func()
async example(token: Secret, repo: string, issueId: number, commit: string, body: string, path: string, side: string, line: number): Promise<void> {
	return dag
		.githubIssue(token)
		.writePullRequestCodeComment(repo, issueId, commit, body, path, side, line)
}

getPrForCommit() 🔗

Gets the pull request number for a commit

Return Type
Integer !
Arguments
NameTypeDefault ValueDescription
repoString !-Github repo, e.g https://github.com/owner/repo
commitString !-Git commit sha
Example
dagger -m github.com/kpenfound/dag/github-issue@7cf4101972d47d1d8e83ce98d9a2f8a5f576dff0 call \
 --token env:MYSECRET get-pr-for-commit --repo string --commit string
func (m *myModule) example(ctx context.Context, token *Secret, repo string, commit string) int  {
	return dag.
			GithubIssue(token).
			GetPrForCommit(ctx, repo, commit)
}
@function
async def example(token: dagger.Secret, repo: str, commit: str) -> int:
	return await (
		dag.github_issue(token)
		.get_pr_for_commit(repo, commit)
	)
@func()
async example(token: Secret, repo: string, commit: string): Promise<number> {
	return dag
		.githubIssue(token)
		.getPrForCommit(repo, commit)
}

GithubIssueData 🔗

issueNumber() 🔗

Return Type
Integer !
Example
dagger -m github.com/kpenfound/dag/github-issue@7cf4101972d47d1d8e83ce98d9a2f8a5f576dff0 call \
 write --repo string --title string --body string \
 issue-number
func (m *myModule) example(ctx context.Context, repo string, title string, body string) int  {
	return dag.
			GithubIssue().
			Write(repo, title, body).
			IssueNumber(ctx)
}
@function
async def example(repo: str, title: str, body: str) -> int:
	return await (
		dag.github_issue()
		.write(repo, title, body)
		.issue_number()
	)
@func()
async example(repo: string, title: string, body: string): Promise<number> {
	return dag
		.githubIssue()
		.write(repo, title, body)
		.issueNumber()
}

title() 🔗

Issue title

Return Type
String !
Example
dagger -m github.com/kpenfound/dag/github-issue@7cf4101972d47d1d8e83ce98d9a2f8a5f576dff0 call \
 write --repo string --title string --body string \
 title
func (m *myModule) example(ctx context.Context, repo string, title string, body string) string  {
	return dag.
			GithubIssue().
			Write(repo, title, body).
			Title(ctx)
}
@function
async def example(repo: str, title: str, body: str) -> str:
	return await (
		dag.github_issue()
		.write(repo, title, body)
		.title()
	)
@func()
async example(repo: string, title: string, body: string): Promise<string> {
	return dag
		.githubIssue()
		.write(repo, title, body)
		.title()
}

body() 🔗

Issue body content

Return Type
String !
Example
dagger -m github.com/kpenfound/dag/github-issue@7cf4101972d47d1d8e83ce98d9a2f8a5f576dff0 call \
 write --repo string --title string --body string \
 body
func (m *myModule) example(ctx context.Context, repo string, title string, body string) string  {
	return dag.
			GithubIssue().
			Write(repo, title, body).
			Body(ctx)
}
@function
async def example(repo: str, title: str, body: str) -> str:
	return await (
		dag.github_issue()
		.write(repo, title, body)
		.body()
	)
@func()
async example(repo: string, title: string, body: string): Promise<string> {
	return dag
		.githubIssue()
		.write(repo, title, body)
		.body()
}

headRef() 🔗

Head ref for a pull request

Return Type
String !
Example
dagger -m github.com/kpenfound/dag/github-issue@7cf4101972d47d1d8e83ce98d9a2f8a5f576dff0 call \
 write --repo string --title string --body string \
 head-ref
func (m *myModule) example(ctx context.Context, repo string, title string, body string) string  {
	return dag.
			GithubIssue().
			Write(repo, title, body).
			HeadRef(ctx)
}
@function
async def example(repo: str, title: str, body: str) -> str:
	return await (
		dag.github_issue()
		.write(repo, title, body)
		.head_ref()
	)
@func()
async example(repo: string, title: string, body: string): Promise<string> {
	return dag
		.githubIssue()
		.write(repo, title, body)
		.headRef()
}

baseRef() 🔗

Base ref for a pull request

Return Type
String !
Example
dagger -m github.com/kpenfound/dag/github-issue@7cf4101972d47d1d8e83ce98d9a2f8a5f576dff0 call \
 write --repo string --title string --body string \
 base-ref
func (m *myModule) example(ctx context.Context, repo string, title string, body string) string  {
	return dag.
			GithubIssue().
			Write(repo, title, body).
			BaseRef(ctx)
}
@function
async def example(repo: str, title: str, body: str) -> str:
	return await (
		dag.github_issue()
		.write(repo, title, body)
		.base_ref()
	)
@func()
async example(repo: string, title: string, body: string): Promise<string> {
	return dag
		.githubIssue()
		.write(repo, title, body)
		.baseRef()
}