github
No long description provided.
Installation
dagger install github.com/jumppad-labs/daggerverse/github@b233ced32d17fe291f923592051291a2483c47f0
Types
Github π
token() π
Return Type
String !
Example
func (m *myModule) example(ctx context.Context) string {
return dag.
Github().
Token(ctx)
}
withToken() π
WithToken sets the GithHub token for any opeations that require it
Return Type
Github !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
token | String ! | - | No description provided |
Example
func (m *myModule) example(token string) *Github {
return dag.
Github().
WithToken(token)
}
createRelease() π
TagRepository creates a tag for a repository with the given commit sha and an optional list of files note: only the top level files in the directory will be uploaded, this function does not support subdirectories
Return Type
Void !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
owner | String ! | - | No description provided |
repo | String ! | - | No description provided |
tag | String ! | - | No description provided |
sha | String ! | - | No description provided |
files | Directory | - | No description provided |
Example
func (m *myModule) example(ctx context.Context, owner string, repo string, tag string, sha string) {
return dag.
Github().
CreateRelease(ctx, owner, repo, tag, sha)
}
nextVersionFromAssociatedPrlabel() π
NextVersionFromAssociatedPRLabel returns a the next semantic version based on the presence of a PR label for the given commit SHA. If there are multiple PRs associated with the commit, the highest label from any matching PR will be used
i.e. if the SHA has an associated PR with a label of major
and the current tag is 1.1.2
the next version will be 2.0.0
if the PR has a tag of minor
and the current tag is 1.1.2
the next version will be 1.2.0
if the PR has a tag of patch
and the current tag is 1.1.2
the next version will be 1.1.3
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
owner | String ! | - | No description provided |
repo | String ! | - | No description provided |
sha | String ! | - | No description provided |
Example
func (m *myModule) example(ctx context.Context, owner string, repo string, sha string) string {
return dag.
Github().
NextVersionFromAssociatedPrlabel(ctx, owner, repo, sha)
}
ftestCreateRelease() π
example: dagger call ftest-create-release βtoken=GITHUB_TOKEN βfiles=./testfiles
Return Type
Void !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
token | Secret ! | - | No description provided |
files | Directory | - | No description provided |
Example
func (m *myModule) example(ctx context.Context, token *Secret) {
return dag.
Github().
FtestCreateRelease(ctx, token)
}
ftestBumpVersionWithPrtag() π
example: dagger call ftest-bump-version-with-prtag βtoken=GITHUB_TOKEN
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
token | Secret ! | - | No description provided |
Example
func (m *myModule) example(ctx context.Context, token *Secret) string {
return dag.
Github().
FtestBumpVersionWithPrtag(ctx, token)
}