Documentation
¶
Index ¶
- func AutoApprove_IsComponent(x interface{}) *bool
- func AutoApprove_IsConstruct(x interface{}) *bool
- func AutoMerge_IsComponent(x interface{}) *bool
- func AutoMerge_IsConstruct(x interface{}) *bool
- func AutoQueue_IsComponent(x interface{}) *bool
- func AutoQueue_IsConstruct(x interface{}) *bool
- func Dependabot_IsComponent(x interface{}) *bool
- func Dependabot_IsConstruct(x interface{}) *bool
- func GitHubProject_DEFAULT_TASK() *string
- func GitHubProject_IsConstruct(x interface{}) *bool
- func GitHubProject_IsProject(x interface{}) *bool
- func GitHubProject_Of(construct constructs.IConstruct) projen.Project
- func GitHub_IsComponent(x interface{}) *bool
- func GitHub_IsConstruct(x interface{}) *bool
- func GithubWorkflow_IsComponent(x interface{}) *bool
- func GithubWorkflow_IsConstruct(x interface{}) *bool
- func MergeQueue_IsComponent(x interface{}) *bool
- func MergeQueue_IsConstruct(x interface{}) *bool
- func Mergify_IsComponent(x interface{}) *bool
- func Mergify_IsConstruct(x interface{}) *bool
- func NewAutoApprove_Override(a AutoApprove, github GitHub, options *AutoApproveOptions)
- func NewAutoMerge_Override(a AutoMerge, github GitHub, options *AutoMergeOptions)
- func NewAutoQueue_Override(a AutoQueue, scope constructs.IConstruct, options *AutoQueueOptions)
- func NewDependabot_Override(d Dependabot, github GitHub, options *DependabotOptions)
- func NewGitHubActionsProvider_Override(g GitHubActionsProvider)
- func NewGitHubProject_Override(g GitHubProject, options *GitHubProjectOptions)deprecated
- func NewGitHub_Override(g GitHub, project projen.Project, options *GitHubOptions)
- func NewGithubWorkflow_Override(g GithubWorkflow, github GitHub, name *string, options *GithubWorkflowOptions)
- func NewMergeQueue_Override(m MergeQueue, scope constructs.IConstruct, options *MergeQueueOptions)
- func NewMergify_Override(m Mergify, github GitHub, options *MergifyOptions)
- func NewPullRequestBackport_Override(p PullRequestBackport, scope constructs.IConstruct, ...)
- func NewPullRequestLint_Override(p PullRequestLint, github GitHub, options *PullRequestLintOptions)
- func NewPullRequestTemplate_Override(p PullRequestTemplate, github GitHub, options *PullRequestTemplateOptions)
- func NewStale_Override(s Stale, github GitHub, options *StaleOptions)
- func NewTaskWorkflowJob_Override(t TaskWorkflowJob, scope constructs.IConstruct, task projen.Task, ...)
- func NewTaskWorkflow_Override(t TaskWorkflow, github GitHub, options *TaskWorkflowOptions)
- func NewWorkflowActions_Override(w WorkflowActions)
- func NewWorkflowJobs_Override(w WorkflowJobs)
- func NewWorkflowSteps_Override(w WorkflowSteps)
- func PullRequestBackport_IsComponent(x interface{}) *bool
- func PullRequestBackport_IsConstruct(x interface{}) *bool
- func PullRequestLint_IsComponent(x interface{}) *bool
- func PullRequestLint_IsConstruct(x interface{}) *bool
- func PullRequestTemplate_IsComponent(x interface{}) *bool
- func PullRequestTemplate_IsConstruct(x interface{}) *bool
- func Stale_IsComponent(x interface{}) *bool
- func Stale_IsConstruct(x interface{}) *bool
- func TaskWorkflowJob_IsComponent(x interface{}) *bool
- func TaskWorkflowJob_IsConstruct(x interface{}) *bool
- func TaskWorkflow_IsComponent(x interface{}) *bool
- func TaskWorkflow_IsConstruct(x interface{}) *bool
- func WorkflowActions_CheckoutWithPatch(options *CheckoutWithPatchOptions) *[]*workflows.JobStep
- func WorkflowActions_CreatePullRequest(options *CreatePullRequestOptions) *[]*workflows.JobStep
- func WorkflowActions_SetupGitIdentity(id *GitIdentity) *[]*workflows.JobStep
- func WorkflowActions_UploadGitPatch(options *UploadGitPatchOptions) *[]*workflows.JobStep
- func WorkflowJobs_PullRequestFromPatch(options *PullRequestFromPatchOptions) *workflows.Job
- func WorkflowSteps_Checkout(options *CheckoutOptions) *workflows.JobStep
- func WorkflowSteps_DownloadArtifact(options *DownloadArtifactOptions) *workflows.JobStep
- func WorkflowSteps_SetupGitIdentity(options *SetupGitIdentityOptions) *workflows.JobStep
- func WorkflowSteps_TagExists(tag *string, options *workflows.JobStepConfiguration) *workflows.JobStep
- func WorkflowSteps_UploadArtifact(options *UploadArtifactOptions) *workflows.JobStep
- type AutoApprove
- type AutoApproveOptions
- type AutoMerge
- type AutoMergeOptions
- type AutoQueue
- type AutoQueueOptions
- type CheckoutOptions
- type CheckoutWith
- type CheckoutWithPatchOptions
- type ConcurrencyOptions
- type ContributorStatementOptions
- type CreatePullRequestOptions
- type Dependabot
- type DependabotAllow
- type DependabotGroup
- type DependabotIgnore
- type DependabotOptions
- type DependabotRegistry
- type DependabotRegistryType
- type DependabotScheduleInterval
- type DownloadArtifactOptions
- type DownloadArtifactWith
- type GitHub
- type GitHubActionsProvider
- type GitHubOptions
- type GitHubProject
- type GitHubProjectOptions
- type GitIdentity
- type GithubCredentials
- type GithubCredentialsAppOptions
- type GithubCredentialsPersonalAccessTokenOptions
- type GithubWorkflow
- type GithubWorkflowOptions
- type IAddConditionsLater
- type MergeMethod
- type MergeQueue
- type MergeQueueOptions
- type Mergify
- type MergifyConditionalOperator
- type MergifyOptions
- type MergifyQueue
- type MergifyRule
- type PullRequestBackport
- type PullRequestBackportOptions
- type PullRequestFromPatchOptions
- type PullRequestLint
- type PullRequestLintOptions
- type PullRequestPatchSource
- type PullRequestTemplate
- type PullRequestTemplateOptions
- type SemanticTitleOptions
- type SetupGitIdentityOptions
- type Stale
- type StaleBehavior
- type StaleOptions
- type TaskWorkflow
- type TaskWorkflowJob
- type TaskWorkflowJobOptions
- type TaskWorkflowOptions
- type UploadArtifactOptions
- type UploadArtifactWith
- type UploadGitPatchOptions
- type VersioningStrategy
- type WorkflowActions
- type WorkflowJobs
- type WorkflowSteps
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutoApprove_IsComponent ¶ added in v0.76.9
func AutoApprove_IsComponent(x interface{}) *bool
Test whether the given construct is a component. Experimental.
func AutoApprove_IsConstruct ¶ added in v0.76.9
func AutoApprove_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func AutoMerge_IsComponent ¶ added in v0.76.9
func AutoMerge_IsComponent(x interface{}) *bool
Test whether the given construct is a component. Experimental.
func AutoMerge_IsConstruct ¶ added in v0.76.9
func AutoMerge_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func AutoQueue_IsComponent ¶ added in v0.88.6
func AutoQueue_IsComponent(x interface{}) *bool
Test whether the given construct is a component. Experimental.
func AutoQueue_IsConstruct ¶ added in v0.88.6
func AutoQueue_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func Dependabot_IsComponent ¶ added in v0.76.9
func Dependabot_IsComponent(x interface{}) *bool
Test whether the given construct is a component. Experimental.
func Dependabot_IsConstruct ¶ added in v0.76.9
func Dependabot_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func GitHubProject_DEFAULT_TASK ¶
func GitHubProject_DEFAULT_TASK() *string
func GitHubProject_IsConstruct ¶ added in v0.76.9
func GitHubProject_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Deprecated: This is a *temporary* class. At the moment, our base project types such as `NodeProject` and `JavaProject` are derived from this, but we want to be able to use these project types outside of GitHub as well. One of the next steps to address this is to abstract workflows so that different "engines" can be used to implement our CI/CD solutions.
func GitHubProject_IsProject ¶ added in v0.76.9
func GitHubProject_IsProject(x interface{}) *bool
Test whether the given construct is a project. Deprecated: This is a *temporary* class. At the moment, our base project types such as `NodeProject` and `JavaProject` are derived from this, but we want to be able to use these project types outside of GitHub as well. One of the next steps to address this is to abstract workflows so that different "engines" can be used to implement our CI/CD solutions.
func GitHubProject_Of ¶ added in v0.76.9
func GitHubProject_Of(construct constructs.IConstruct) projen.Project
Find the closest ancestor project for given construct.
When given a project, this it the project itself. Deprecated: This is a *temporary* class. At the moment, our base project types such as `NodeProject` and `JavaProject` are derived from this, but we want to be able to use these project types outside of GitHub as well. One of the next steps to address this is to abstract workflows so that different "engines" can be used to implement our CI/CD solutions.
func GitHub_IsComponent ¶ added in v0.76.9
func GitHub_IsComponent(x interface{}) *bool
Test whether the given construct is a component. Experimental.
func GitHub_IsConstruct ¶ added in v0.76.9
func GitHub_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func GithubWorkflow_IsComponent ¶ added in v0.76.9
func GithubWorkflow_IsComponent(x interface{}) *bool
Test whether the given construct is a component. Experimental.
func GithubWorkflow_IsConstruct ¶ added in v0.76.9
func GithubWorkflow_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func MergeQueue_IsComponent ¶ added in v0.88.6
func MergeQueue_IsComponent(x interface{}) *bool
Test whether the given construct is a component. Experimental.
func MergeQueue_IsConstruct ¶ added in v0.88.6
func MergeQueue_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func Mergify_IsComponent ¶ added in v0.76.9
func Mergify_IsComponent(x interface{}) *bool
Test whether the given construct is a component. Experimental.
func Mergify_IsConstruct ¶ added in v0.76.9
func Mergify_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func NewAutoApprove_Override ¶
func NewAutoApprove_Override(a AutoApprove, github GitHub, options *AutoApproveOptions)
Experimental.
func NewAutoMerge_Override ¶
func NewAutoMerge_Override(a AutoMerge, github GitHub, options *AutoMergeOptions)
Experimental.
func NewAutoQueue_Override ¶ added in v0.88.6
func NewAutoQueue_Override(a AutoQueue, scope constructs.IConstruct, options *AutoQueueOptions)
Experimental.
func NewDependabot_Override ¶
func NewDependabot_Override(d Dependabot, github GitHub, options *DependabotOptions)
Experimental.
func NewGitHubActionsProvider_Override ¶
func NewGitHubActionsProvider_Override(g GitHubActionsProvider)
Experimental.
func NewGitHubProject_Override
deprecated
func NewGitHubProject_Override(g GitHubProject, options *GitHubProjectOptions)
Deprecated: This is a *temporary* class. At the moment, our base project types such as `NodeProject` and `JavaProject` are derived from this, but we want to be able to use these project types outside of GitHub as well. One of the next steps to address this is to abstract workflows so that different "engines" can be used to implement our CI/CD solutions.
func NewGitHub_Override ¶
func NewGitHub_Override(g GitHub, project projen.Project, options *GitHubOptions)
Experimental.
func NewGithubWorkflow_Override ¶
func NewGithubWorkflow_Override(g GithubWorkflow, github GitHub, name *string, options *GithubWorkflowOptions)
Experimental.
func NewMergeQueue_Override ¶ added in v0.88.6
func NewMergeQueue_Override(m MergeQueue, scope constructs.IConstruct, options *MergeQueueOptions)
Experimental.
func NewMergify_Override ¶
func NewMergify_Override(m Mergify, github GitHub, options *MergifyOptions)
Experimental.
func NewPullRequestBackport_Override ¶ added in v0.81.13
func NewPullRequestBackport_Override(p PullRequestBackport, scope constructs.IConstruct, options *PullRequestBackportOptions)
Experimental.
func NewPullRequestLint_Override ¶
func NewPullRequestLint_Override(p PullRequestLint, github GitHub, options *PullRequestLintOptions)
Experimental.
func NewPullRequestTemplate_Override ¶
func NewPullRequestTemplate_Override(p PullRequestTemplate, github GitHub, options *PullRequestTemplateOptions)
Experimental.
func NewStale_Override ¶
func NewStale_Override(s Stale, github GitHub, options *StaleOptions)
Experimental.
func NewTaskWorkflowJob_Override ¶ added in v0.78.10
func NewTaskWorkflowJob_Override(t TaskWorkflowJob, scope constructs.IConstruct, task projen.Task, options *TaskWorkflowJobOptions)
Experimental.
func NewTaskWorkflow_Override ¶
func NewTaskWorkflow_Override(t TaskWorkflow, github GitHub, options *TaskWorkflowOptions)
Experimental.
func NewWorkflowActions_Override ¶
func NewWorkflowActions_Override(w WorkflowActions)
Experimental.
func NewWorkflowSteps_Override ¶ added in v0.78.3
func NewWorkflowSteps_Override(w WorkflowSteps)
Experimental.
func PullRequestBackport_IsComponent ¶ added in v0.81.13
func PullRequestBackport_IsComponent(x interface{}) *bool
Test whether the given construct is a component. Experimental.
func PullRequestBackport_IsConstruct ¶ added in v0.81.13
func PullRequestBackport_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func PullRequestLint_IsComponent ¶ added in v0.76.9
func PullRequestLint_IsComponent(x interface{}) *bool
Test whether the given construct is a component. Experimental.
func PullRequestLint_IsConstruct ¶ added in v0.76.9
func PullRequestLint_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func PullRequestTemplate_IsComponent ¶ added in v0.76.9
func PullRequestTemplate_IsComponent(x interface{}) *bool
Test whether the given construct is a component. Experimental.
func PullRequestTemplate_IsConstruct ¶ added in v0.76.9
func PullRequestTemplate_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func Stale_IsComponent ¶ added in v0.76.9
func Stale_IsComponent(x interface{}) *bool
Test whether the given construct is a component. Experimental.
func Stale_IsConstruct ¶ added in v0.76.9
func Stale_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func TaskWorkflowJob_IsComponent ¶ added in v0.78.10
func TaskWorkflowJob_IsComponent(x interface{}) *bool
Test whether the given construct is a component. Experimental.
func TaskWorkflowJob_IsConstruct ¶ added in v0.78.10
func TaskWorkflowJob_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func TaskWorkflow_IsComponent ¶ added in v0.76.9
func TaskWorkflow_IsComponent(x interface{}) *bool
Test whether the given construct is a component. Experimental.
func TaskWorkflow_IsConstruct ¶ added in v0.76.9
func TaskWorkflow_IsConstruct(x interface{}) *bool
Checks if `x` is a construct.
Use this method instead of `instanceof` to properly detect `Construct` instances, even when the construct library is symlinked.
Explanation: in JavaScript, multiple copies of the `constructs` library on disk are seen as independent, completely different libraries. As a consequence, the class `Construct` in each copy of the `constructs` library is seen as a different class, and an instance of one class will not test as `instanceof` the other class. `npm install` will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the `constructs` library can be accidentally installed, and `instanceof` will behave unpredictably. It is safest to avoid using `instanceof`, and using this type-testing method instead.
Returns: true if `x` is an object created from a class which extends `Construct`. Experimental.
func WorkflowActions_CheckoutWithPatch ¶
func WorkflowActions_CheckoutWithPatch(options *CheckoutWithPatchOptions) *[]*workflows.JobStep
Checks out a repository and applies a git patch that was created using `uploadGitPatch`.
Returns: Job steps. Experimental.
func WorkflowActions_CreatePullRequest ¶
func WorkflowActions_CreatePullRequest(options *CreatePullRequestOptions) *[]*workflows.JobStep
A step that creates a pull request based on the current repo state.
Returns: Job steps. Experimental.
func WorkflowActions_SetupGitIdentity ¶
func WorkflowActions_SetupGitIdentity(id *GitIdentity) *[]*workflows.JobStep
Configures the git identity (user name and email).
Returns: Job steps. Deprecated: use `WorkflowSteps.setupGitIdentity` instead
func WorkflowActions_UploadGitPatch ¶
func WorkflowActions_UploadGitPatch(options *UploadGitPatchOptions) *[]*workflows.JobStep
Creates a .patch file from the current git diff and uploads it as an artifact. Use `checkoutWithPatch` to download and apply in another job.
If a patch was uploaded, the action can optionally fail the job.
Returns: Job steps. Experimental.
func WorkflowJobs_PullRequestFromPatch ¶
func WorkflowJobs_PullRequestFromPatch(options *PullRequestFromPatchOptions) *workflows.Job
Creates a pull request with the changes of a patch file.
Returns: Job. Experimental.
func WorkflowSteps_Checkout ¶ added in v0.78.3
func WorkflowSteps_Checkout(options *CheckoutOptions) *workflows.JobStep
Checks out a repository.
Returns: A JobStep that checks out a repository. Experimental.
func WorkflowSteps_DownloadArtifact ¶ added in v0.79.22
func WorkflowSteps_DownloadArtifact(options *DownloadArtifactOptions) *workflows.JobStep
Downloads an artifact.
Returns: A JobStep that downloads an artifact. Experimental.
func WorkflowSteps_SetupGitIdentity ¶ added in v0.78.3
func WorkflowSteps_SetupGitIdentity(options *SetupGitIdentityOptions) *workflows.JobStep
Configures the git identity (user name and email).
Returns: Job step that configures the provided git identity. Experimental.
func WorkflowSteps_TagExists ¶ added in v0.79.2
func WorkflowSteps_TagExists(tag *string, options *workflows.JobStepConfiguration) *workflows.JobStep
Checks if a tag exists.
Requires a checkout step to have been run before this step with "fetch-depth" set to "0".
Outputs: - `exists`: A string value of 'true' or 'false' indicating if the tag exists.
Returns: Job step that checks if the provided tag exists. Experimental.
func WorkflowSteps_UploadArtifact ¶ added in v0.78.10
func WorkflowSteps_UploadArtifact(options *UploadArtifactOptions) *workflows.JobStep
Uploads an artifact.
Returns: A JobStep that uploads an artifact. Experimental.
Types ¶
type AutoApprove ¶
type AutoApprove interface {
projen.Component
// Experimental.
Label() *string
// The tree node.
// Experimental.
Node() constructs.Node
// Experimental.
Project() projen.Project
// Called after synthesis.
//
// Order is *not* guaranteed.
// Experimental.
PostSynthesize()
// Called before synthesis.
// Experimental.
PreSynthesize()
// Synthesizes files to the project output directory.
// Experimental.
Synthesize()
// Returns a string representation of this construct.
// Experimental.
ToString() *string
}
Auto approve pull requests that meet a criteria. Experimental.
func NewAutoApprove ¶
func NewAutoApprove(github GitHub, options *AutoApproveOptions) AutoApprove
Experimental.
type AutoApproveOptions ¶
type AutoApproveOptions struct {
// Only pull requests authored by these Github usernames will be auto-approved.
// Default: ['github-bot'].
//
// Experimental.
AllowedUsernames *[]*string `field:"optional" json:"allowedUsernames" yaml:"allowedUsernames"`
// Only pull requests with this label will be auto-approved.
// Default: 'auto-approve'.
//
// Experimental.
Label *string `field:"optional" json:"label" yaml:"label"`
// Github Runner selection labels.
// Default: ["ubuntu-latest"].
//
// Experimental.
RunsOn *[]*string `field:"optional" json:"runsOn" yaml:"runsOn"`
// Github Runner Group selection options.
// Experimental.
RunsOnGroup *projen.GroupRunnerOptions `field:"optional" json:"runsOnGroup" yaml:"runsOnGroup"`
// A GitHub secret name which contains a GitHub Access Token with write permissions for the `pull_request` scope.
//
// This token is used to approve pull requests.
//
// Github forbids an identity to approve its own pull request.
// If your project produces automated pull requests using the Github default token -
// {@link https://docs.github.com/en/actions/reference/authentication-in-a-workflow `GITHUB_TOKEN` }
// - that you would like auto approved, such as when using the `depsUpgrade` property in
// `NodeProjectOptions`, then you must use a different token here.
// Default: "GITHUB_TOKEN".
//
// Experimental.
Secret *string `field:"optional" json:"secret" yaml:"secret"`
}
Options for 'AutoApprove'. Experimental.
type AutoMerge ¶
type AutoMerge interface {
projen.Component
// The tree node.
// Experimental.
Node() constructs.Node
// Experimental.
Project() projen.Project
// Adds conditions to the auto merge rule.
// Experimental.
AddConditions(conditions ...*string)
// Adds conditions that will be rendered only during synthesis.
// Experimental.
AddConditionsLater(later IAddConditionsLater)
// Called after synthesis.
//
// Order is *not* guaranteed.
// Experimental.
PostSynthesize()
// Called before synthesis.
// Experimental.
PreSynthesize()
// Synthesizes files to the project output directory.
// Experimental.
Synthesize()
// Returns a string representation of this construct.
// Experimental.
ToString() *string
}
Sets up mergify to merging approved pull requests.
If `buildJob` is specified, the specified GitHub workflow job ID is required to succeed in order for the PR to be merged.
`approvedReviews` specified the number of code review approvals required for the PR to be merged. Experimental.
func NewAutoMerge ¶
func NewAutoMerge(github GitHub, options *AutoMergeOptions) AutoMerge
Experimental.
type AutoMergeOptions ¶
type AutoMergeOptions struct {
// Number of approved code reviews.
// Default: 1.
//
// Experimental.
ApprovedReviews *float64 `field:"optional" json:"approvedReviews" yaml:"approvedReviews"`
// List of labels that will prevent auto-merging.
// Default: ['do-not-merge'].
//
// Experimental.
BlockingLabels *[]*string `field:"optional" json:"blockingLabels" yaml:"blockingLabels"`
// Name of the mergify queue.
// Default: 'default'.
//
// Experimental.
QueueName *string `field:"optional" json:"queueName" yaml:"queueName"`
// Name of the mergify rule.
// Default: 'Automatic merge on approval and successful build'.
//
// Experimental.
RuleName *string `field:"optional" json:"ruleName" yaml:"ruleName"`
}
Experimental.
type AutoQueue ¶ added in v0.88.6
type AutoQueue interface {
projen.Component
// The tree node.
// Experimental.
Node() constructs.Node
// Experimental.
Project() projen.Project
// Called after synthesis.
//
// Order is *not* guaranteed.
// Experimental.
PostSynthesize()
// Called before synthesis.
// Experimental.
PreSynthesize()
// Synthesizes files to the project output directory.
// Experimental.
Synthesize()
// Returns a string representation of this construct.
// Experimental.
ToString() *string
}
Automatically add pull requests to the merge queue PRs will be merged once they pass required checks. Experimental.
func NewAutoQueue ¶ added in v0.88.6
func NewAutoQueue(scope constructs.IConstruct, options *AutoQueueOptions) AutoQueue
Experimental.
type AutoQueueOptions ¶ added in v0.88.6
type AutoQueueOptions struct {
// Only pull requests authored by these Github usernames will have auto-queue enabled.
// Default: - pull requests from all users are eligible for auto-queuing.
//
// Experimental.
AllowedUsernames *[]*string `field:"optional" json:"allowedUsernames" yaml:"allowedUsernames"`
// Only pull requests with one of this labels will have auto-queue enabled.
// Default: - all pull requests are eligible for auto-queueing.
//
// Experimental.
Labels *[]*string `field:"optional" json:"labels" yaml:"labels"`
// The method used to add the PR to the merge queue Any branch protection rules must allow this merge method.
// Default: MergeMethod.SQUASH
//
// Experimental.
MergeMethod MergeMethod `field:"optional" json:"mergeMethod" yaml:"mergeMethod"`
// Choose a method for authenticating with GitHub to enable auto-queue on pull requests.
//
// The workflow cannot use a default github token. Queuing a PR
// with the default token will not trigger any merge queue workflows,
// which results in the PR just not getting merged at all.
// See: https://projen.io/docs/integrations/github/
//
// Default: - uses credentials from the GitHub component.
//
// Experimental.
ProjenCredentials GithubCredentials `field:"optional" json:"projenCredentials" yaml:"projenCredentials"`
// Github Runner selection labels.
// Default: ["ubuntu-latest"].
//
// Experimental.
RunsOn *[]*string `field:"optional" json:"runsOn" yaml:"runsOn"`
}
Options for 'AutoQueue'. Experimental.
type CheckoutOptions ¶ added in v0.78.3
type CheckoutOptions struct {
// Sets environment variables for steps to use in the runner environment.
//
// You can also set environment variables for the entire workflow or a job.
// Experimental.
Env *map[string]*string `field:"optional" json:"env" yaml:"env"`
// A unique identifier for the step.
//
// You can use the id to reference the
// step in contexts.
// Experimental.
Id *string `field:"optional" json:"id" yaml:"id"`
// You can use the if conditional to prevent a job from running unless a condition is met.
//
// You can use any supported context and expression to
// create a conditional.
// Experimental.
If *string `field:"optional" json:"if" yaml:"if"`
// A name for your step to display on GitHub.
// Experimental.
Name *string `field:"optional" json:"name" yaml:"name"`
// Specifies a working directory for a step.
//
// Overrides a job's working directory.
// Experimental.
WorkingDirectory *string `field:"optional" json:"workingDirectory" yaml:"workingDirectory"`
// Prevents a job from failing when a step fails.
//
// Set to true to allow a job
// to pass when this step fails.
// Experimental.
ContinueOnError *bool `field:"optional" json:"continueOnError" yaml:"continueOnError"`
// The maximum number of minutes to run the step before killing the process.
// Experimental.
TimeoutMinutes *float64 `field:"optional" json:"timeoutMinutes" yaml:"timeoutMinutes"`
// Options for `checkout`.
// Experimental.
With *CheckoutWith `field:"optional" json:"with" yaml:"with"`
}
Experimental.
type CheckoutWith ¶ added in v0.78.3
type CheckoutWith struct {
// Number of commits to fetch.
//
// 0 indicates all history for all branches and tags.
// Default: 1.
//
// Experimental.
FetchDepth *float64 `field:"optional" json:"fetchDepth" yaml:"fetchDepth"`
// Whether LFS is enabled for the GitHub repository.
// Default: false.
//
// Experimental.
Lfs *bool `field:"optional" json:"lfs" yaml:"lfs"`
// Relative path under $GITHUB_WORKSPACE to place the repository.
// Default: - $GITHUB_WORKSPACE.
//
// Experimental.
Path *string `field:"optional" json:"path" yaml:"path"`
// Branch or tag name.
// Default: - the default branch is implicitly used.
//
// Experimental.
Ref *string `field:"optional" json:"ref" yaml:"ref"`
// The repository (owner/repo) to use.
// Default: - the default repository is implicitly used.
//
// Experimental.
Repository *string `field:"optional" json:"repository" yaml:"repository"`
// A GitHub token to use when checking out the repository.
//
// If the intent is to push changes back to the branch, then you must use a
// PAT with `repo` (and possibly `workflows`) permissions.
// Default: - the default GITHUB_TOKEN is implicitly used.
//
// Experimental.
Token *string `field:"optional" json:"token" yaml:"token"`
}
Options for `checkout`. Experimental.
type CheckoutWithPatchOptions ¶
type CheckoutWithPatchOptions struct {
// Number of commits to fetch.
//
// 0 indicates all history for all branches and tags.
// Default: 1.
//
// Experimental.
FetchDepth *float64 `field:"optional" json:"fetchDepth" yaml:"fetchDepth"`
// Whether LFS is enabled for the GitHub repository.
// Default: false.
//
// Experimental.
Lfs *bool `field:"optional" json:"lfs" yaml:"lfs"`
// Relative path under $GITHUB_WORKSPACE to place the repository.
// Default: - $GITHUB_WORKSPACE.
//
// Experimental.
Path *string `field:"optional" json:"path" yaml:"path"`
// Branch or tag name.
// Default: - the default branch is implicitly used.
//
// Experimental.
Ref *string `field:"optional" json:"ref" yaml:"ref"`
// The repository (owner/repo) to use.
// Default: - the default repository is implicitly used.
//
// Experimental.
Repository *string `field:"optional" json:"repository" yaml:"repository"`
// A GitHub token to use when checking out the repository.
//
// If the intent is to push changes back to the branch, then you must use a
// PAT with `repo` (and possibly `workflows`) permissions.
// Default: - the default GITHUB_TOKEN is implicitly used.
//
// Experimental.
Token *string `field:"optional" json:"token" yaml:"token"`
// The name of the artifact the patch is stored as.
// Default: ".repo.patch"
//
// Experimental.
PatchFile *string `field:"optional" json:"patchFile" yaml:"patchFile"`
}
Options for `checkoutWithPatch`. Experimental.
type ConcurrencyOptions ¶ added in v0.85.0
type ConcurrencyOptions struct {
// When a workflow is triggered while another one (in the same group) is running, should GitHub cancel the running workflow?
// Default: false.
//
// Experimental.
CancelInProgress *bool `field:"optional" json:"cancelInProgress" yaml:"cancelInProgress"`
// Concurrency group controls which workflow runs will share the same concurrency limit.
//
// For example, if you specify `${{ github.workflow }}-${{ github.ref }}`, workflow runs triggered
// on the same branch cannot run concurrenty, but workflows runs triggered on different branches can.
// See: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/using-concurrency#example-concurrency-groups
//
// Default: - ${{ github.workflow }}
//
// Experimental.
Group *string `field:"optional" json:"group" yaml:"group"`
}
Options for `concurrency`. Experimental.
type ContributorStatementOptions ¶ added in v0.72.30
type ContributorStatementOptions struct {
// Pull requests with one of these labels are exempted from a contributor statement.
// Default: - no labels are excluded.
//
// Experimental.
ExemptLabels *[]*string `field:"optional" json:"exemptLabels" yaml:"exemptLabels"`
// Pull requests from these GitHub users are exempted from a contributor statement.
// Default: - no users are exempted.
//
// Experimental.
ExemptUsers *[]*string `field:"optional" json:"exemptUsers" yaml:"exemptUsers"`
}
Options for requiring a contributor statement on Pull Requests. Experimental.
type CreatePullRequestOptions ¶
type CreatePullRequestOptions struct {
// Description added to the pull request.
//
// Providence information are automatically added.
// Experimental.
PullRequestDescription *string `field:"required" json:"pullRequestDescription" yaml:"pullRequestDescription"`
// The full title used to create the pull request.
//
// If PR titles are validated in this repo, the title should comply with the respective rules.
// Experimental.
PullRequestTitle *string `field:"required" json:"pullRequestTitle" yaml:"pullRequestTitle"`
// The name of the workflow that will create the PR.
// Experimental.
WorkflowName *string `field:"required" json:"workflowName" yaml:"workflowName"`
// Assignees to add on the PR.
// Default: - no assignees.
//
// Experimental.
Assignees *[]*string `field:"optional" json:"assignees" yaml:"assignees"`
// Sets the pull request base branch.
// Default: - The branch checked out in the workflow.
//
// Experimental.
BaseBranch *string `field:"optional" json:"baseBranch" yaml:"baseBranch"`
// The pull request branch name.
// Default: `github-actions/${options.workflowName}`
//
// Experimental.
BranchName *string `field:"optional" json:"branchName" yaml:"branchName"`
// The job credentials used to create the pull request.
//
// Provided credentials must have permissions to create a pull request on the repository.
// Experimental.
Credentials GithubCredentials `field:"optional" json:"credentials" yaml:"credentials"`
// The git identity used to create the commit.
// Default: - the default github-actions user.
//
// Experimental.
GitIdentity *GitIdentity `field:"optional" json:"gitIdentity" yaml:"gitIdentity"`
// Labels to apply on the PR.
// Default: - no labels.
//
// Experimental.
Labels *[]*string `field:"optional" json:"labels" yaml:"labels"`
// Add Signed-off-by line by the committer at the end of the commit log message.
// Default: true.
//
// Experimental.
Signoff *bool `field:"optional" json:"signoff" yaml:"signoff"`
// The step ID which produces the output which indicates if a patch was created.
// Default: "create_pr".
//
// Experimental.
StepId *string `field:"optional" json:"stepId" yaml:"stepId"`
// The name of the step displayed on GitHub.
// Default: "Create Pull Request".
//
// Experimental.
StepName *string `field:"optional" json:"stepName" yaml:"stepName"`
}
Experimental.
type Dependabot ¶
type Dependabot interface {
projen.Component
// The raw dependabot configuration.
// See: https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates
//
// Experimental.
Config() interface{}
// Whether or not projen is also upgraded in this config,.
// Experimental.
IgnoresProjen() *bool
// The tree node.
// Experimental.
Node() constructs.Node
// Experimental.
Project() projen.Project
// Allows a dependency from automatic updates.
// Experimental.
AddAllow(dependencyName *string)
// Ignores a dependency from automatic updates.
// Experimental.
AddIgnore(dependencyName *string, versions ...*string)
// Called after synthesis.
//
// Order is *not* guaranteed.
// Experimental.
PostSynthesize()
// Called before synthesis.
// Experimental.
PreSynthesize()
// Synthesizes files to the project output directory.
// Experimental.
Synthesize()
// Returns a string representation of this construct.
// Experimental.
ToString() *string
}
Defines dependabot configuration for node projects.
Since module versions are managed in projen, the versioning strategy will be configured to "lockfile-only" which means that only updates that can be done on the lockfile itself will be proposed. Experimental.
func NewDependabot ¶
func NewDependabot(github GitHub, options *DependabotOptions) Dependabot
Experimental.
type DependabotAllow ¶ added in v0.71.131
type DependabotAllow struct {
// Use to allow updates for dependencies with matching names, optionally using `*` to match zero or more characters.
//
// For Java dependencies, the format of the dependency-name attribute is:
// `groupId:artifactId`, for example: `org.kohsuke:github-api`.
// Experimental.
DependencyName *string `field:"required" json:"dependencyName" yaml:"dependencyName"`
}
You can use the `allow` option to customize which dependencies are updated.
The allow option supports the following options. Experimental.
type DependabotGroup ¶ added in v0.71.131
type DependabotGroup struct {
// Define a list of strings (with or without wildcards) that will match package names to form this dependency group.
// Experimental.
Patterns *[]*string `field:"required" json:"patterns" yaml:"patterns"`
// Optionally you can use this to exclude certain dependencies from the group.
// Experimental.
ExcludePatterns *[]*string `field:"optional" json:"excludePatterns" yaml:"excludePatterns"`
}
Defines a single group for dependency updates. Experimental.
type DependabotIgnore ¶
type DependabotIgnore struct {
// Use to ignore updates for dependencies with matching names, optionally using `*` to match zero or more characters.
//
// For Java dependencies, the format of the dependency-name attribute is:
// `groupId:artifactId`, for example: `org.kohsuke:github-api`.
// Experimental.
DependencyName *string `field:"required" json:"dependencyName" yaml:"dependencyName"`
// Use to ignore specific versions or ranges of versions.
//
// If you want to
// define a range, use the standard pattern for the package manager (for
// example: `^1.0.0` for npm, or `~> 2.0` for Bundler).
// Experimental.
Versions *[]*string `field:"optional" json:"versions" yaml:"versions"`
}
You can use the `ignore` option to customize which dependencies are updated.
The ignore option supports the following options. Experimental.
type DependabotOptions ¶
type DependabotOptions struct {
// https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#allow.
//
// Use the allow option to customize which dependencies are updated. This
// applies to both version and security updates.
// Default: [].
//
// Experimental.
Allow *[]*DependabotAllow `field:"optional" json:"allow" yaml:"allow"`
// Specify individual assignees or teams of assignees for all pull requests raised for a package manager.
// Default: [].
//
// Experimental.
Assignees *[]*string `field:"optional" json:"assignees" yaml:"assignees"`
// https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#groups.
//
// You can create groups to package dependency updates together into a single PR.
// Default: [].
//
// Experimental.
Groups *map[string]*DependabotGroup `field:"optional" json:"groups" yaml:"groups"`
// You can use the `ignore` option to customize which dependencies are updated.
//
// The ignore option supports the following options.
// Default: [].
//
// Experimental.
Ignore *[]*DependabotIgnore `field:"optional" json:"ignore" yaml:"ignore"`
// Ignores updates to `projen`.
//
// This is required since projen updates may cause changes in committed files
// and anti-tamper checks will fail.
//
// Projen upgrades are covered through the `ProjenUpgrade` class.
// Default: true.
//
// Experimental.
IgnoreProjen *bool `field:"optional" json:"ignoreProjen" yaml:"ignoreProjen"`
// List of labels to apply to the created PR's.
// Experimental.
Labels *[]*string `field:"optional" json:"labels" yaml:"labels"`
// Sets the maximum of pull requests Dependabot opens for version updates.
//
// Dependabot will not open any new requests until some of those open requests
// are merged or closed.
// Default: 5.
//
// Experimental.
OpenPullRequestsLimit *float64 `field:"optional" json:"openPullRequestsLimit" yaml:"openPullRequestsLimit"`
// Map of package registries to use.
// Default: - use public registries.
//
// Experimental.
Registries *map[string]*DependabotRegistry `field:"optional" json:"registries" yaml:"registries"`
// Specify individual reviewers or teams of reviewers for all pull requests raised for a package manager.
// Default: [].
//
// Experimental.
Reviewers *[]*string `field:"optional" json:"reviewers" yaml:"reviewers"`
// How often to check for new versions and raise pull requests.
// Default: ScheduleInterval.DAILY
//
// Experimental.
ScheduleInterval DependabotScheduleInterval `field:"optional" json:"scheduleInterval" yaml:"scheduleInterval"`
// https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#target-branch You can configure the target branch for raising pull requests for version updates against.
// Experimental.
TargetBranch *string `field:"optional" json:"targetBranch" yaml:"targetBranch"`
// The strategy to use when edits manifest and lock files.
// Default: VersioningStrategy.LOCKFILE_ONLY The default is to only update the
// lock file because package.json is controlled by projen and any outside
// updates will fail the build.
//
// Experimental.
VersioningStrategy VersioningStrategy `field:"optional" json:"versioningStrategy" yaml:"versioningStrategy"`
}
Experimental.
type DependabotRegistry ¶
type DependabotRegistry struct {
// Registry type e.g. 'npm-registry' or 'docker-registry'.
// Experimental.
Type DependabotRegistryType `field:"required" json:"type" yaml:"type"`
// Url for the registry e.g. 'https://npm.pkg.github.com' or 'registry.hub.docker.com'.
// Experimental.
Url *string `field:"required" json:"url" yaml:"url"`
// A reference to a Dependabot secret containing an access key for this registry.
// Default: undefined.
//
// Experimental.
Key *string `field:"optional" json:"key" yaml:"key"`
// Used with the hex-organization registry type.
// See: https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates#hex-organization
//
// Default: undefined.
//
// Experimental.
Organization *string `field:"optional" json:"organization" yaml:"organization"`
// A reference to a Dependabot secret containing the password for the specified user.
// Default: undefined.
//
// Experimental.
Password *string `field:"optional" json:"password" yaml:"password"`
// For registries with type: python-index, if the boolean value is true, pip esolves dependencies by using the specified URL rather than the base URL of the Python Package Index (by default https://pypi.org/simple).
// Default: undefined.
//
// Experimental.
ReplacesBase *bool `field:"optional" json:"replacesBase" yaml:"replacesBase"`
// Secret token for dependabot access e.g. '${{ secrets.DEPENDABOT_PACKAGE_TOKEN }}'.
// Default: undefined.
//
// Experimental.
Token *string `field:"optional" json:"token" yaml:"token"`
// The username that Dependabot uses to access the registry.
// Default: - do not authenticate.
//
// Experimental.
Username *string `field:"optional" json:"username" yaml:"username"`
}
Use to add private registry support for dependabot. See: https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates#configuration-options-for-private-registries
Experimental.
type DependabotRegistryType ¶
type DependabotRegistryType string
Each configuration type requires you to provide particular settings.
Some types allow more than one way to connect. See: https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates#configuration-options-for-private-registries
Experimental.
const ( // The composer-repository type supports username and password. // See: https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates#composer-repository // // Experimental. DependabotRegistryType_COMPOSER_REGISTRY DependabotRegistryType = "COMPOSER_REGISTRY" // The docker-registry type supports username and password. // // The docker-registry type can also be used to pull from Amazon ECR using static AWS credentials. // See: https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates#docker-registry // // Experimental. DependabotRegistryType_DOCKER_REGISTRY DependabotRegistryType = "DOCKER_REGISTRY" // The git type supports username and password. // See: https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates#git // // Experimental. DependabotRegistryType_GIT DependabotRegistryType = "GIT" // The hex-organization type supports organization and key. // See: https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates#hex-organization // // Experimental. DependabotRegistryType_HEX_ORGANIZATION DependabotRegistryType = "HEX_ORGANIZATION" // The maven-repository type supports username and password, or token. // See: https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates#maven-repository // // Experimental. DependabotRegistryType_MAVEN_REPOSITORY DependabotRegistryType = "MAVEN_REPOSITORY" // The npm-registry type supports username and password, or token. // See: https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates#npm-registry // // Experimental. DependabotRegistryType_NPM_REGISTRY DependabotRegistryType = "NPM_REGISTRY" // The nuget-feed type supports username and password, or token. // See: https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates#nuget-feed // // Experimental. DependabotRegistryType_NUGET_FEED DependabotRegistryType = "NUGET_FEED" // The python-index type supports username and password, or token. // See: https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates#python-index // // Experimental. DependabotRegistryType_PYTHON_INDEX DependabotRegistryType = "PYTHON_INDEX" // The rubygems-server type supports username and password, or token. // See: https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates#rubygems-server // // Experimental. DependabotRegistryType_RUBYGEMS_SERVER DependabotRegistryType = "RUBYGEMS_SERVER" // The terraform-registry type supports a token. // See: https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates#terraform-registry // // Experimental. DependabotRegistryType_TERRAFORM_REGISTRY DependabotRegistryType = "TERRAFORM_REGISTRY" )
type DependabotScheduleInterval ¶
type DependabotScheduleInterval string
How often to check for new versions and raise pull requests for version updates. Experimental.
const ( // Runs on every weekday, Monday to Friday. // Experimental. DependabotScheduleInterval_DAILY DependabotScheduleInterval = "DAILY" // Runs once each week. // // By default, this is on Monday. // Experimental. DependabotScheduleInterval_WEEKLY DependabotScheduleInterval = "WEEKLY" // Runs once each month. // // This is on the first day of the month. // Experimental. DependabotScheduleInterval_MONTHLY DependabotScheduleInterval = "MONTHLY" )
type DownloadArtifactOptions ¶ added in v0.79.22
type DownloadArtifactOptions struct {
// Sets environment variables for steps to use in the runner environment.
//
// You can also set environment variables for the entire workflow or a job.
// Experimental.
Env *map[string]*string `field:"optional" json:"env" yaml:"env"`
// A unique identifier for the step.
//
// You can use the id to reference the
// step in contexts.
// Experimental.
Id *string `field:"optional" json:"id" yaml:"id"`
// You can use the if conditional to prevent a job from running unless a condition is met.
//
// You can use any supported context and expression to
// create a conditional.
// Experimental.
If *string `field:"optional" json:"if" yaml:"if"`
// A name for your step to display on GitHub.
// Experimental.
Name *string `field:"optional" json:"name" yaml:"name"`
// Specifies a working directory for a step.
//
// Overrides a job's working directory.
// Experimental.
WorkingDirectory *string `field:"optional" json:"workingDirectory" yaml:"workingDirectory"`
// Prevents a job from failing when a step fails.
//
// Set to true to allow a job
// to pass when this step fails.
// Experimental.
ContinueOnError *bool `field:"optional" json:"continueOnError" yaml:"continueOnError"`
// The maximum number of minutes to run the step before killing the process.
// Experimental.
TimeoutMinutes *float64 `field:"optional" json:"timeoutMinutes" yaml:"timeoutMinutes"`
// Options for `download-artifact`.
// Experimental.
With *DownloadArtifactWith `field:"required" json:"with" yaml:"with"`
}
Experimental.
type DownloadArtifactWith ¶ added in v0.79.22
type DownloadArtifactWith struct {
// When multiple artifacts are matched, this changes the behavior of the destination directories If true, the downloaded artifacts will be in the same directory specified by path If false, the downloaded artifacts will be extracted into individual named directories within the specified path.
// Default: false.
//
// Experimental.
MergeMultiple *bool `field:"optional" json:"mergeMultiple" yaml:"mergeMultiple"`
// Name of the artifact to download.
// Default: - If unspecified, all artifacts for the run are downloaded.
//
// Experimental.
Name *string `field:"optional" json:"name" yaml:"name"`
// A file, directory or wildcard pattern that describes what to download.
//
// Supports basic tilde expansion.
// Default: - $GITHUB_WORKSPACE.
//
// Experimental.
Path *string `field:"optional" json:"path" yaml:"path"`
// A glob pattern to the artifacts that should be downloaded This is ignored if name is specified.
// Experimental.
Pattern *string `field:"optional" json:"pattern" yaml:"pattern"`
// The repository owner and the repository name joined together by "/" If github-token is specified, this is the repository that artifacts will be downloaded from.
// Default: - ${{ github.repository }}
//
// Experimental.
Repository *string `field:"optional" json:"repository" yaml:"repository"`
// The id of the workflow run where the desired download artifact was uploaded from If github-token is specified, this is the run that artifacts will be downloaded from.
// Default: - ${{ github.run_id }}
//
// Experimental.
RunId *string `field:"optional" json:"runId" yaml:"runId"`
// The GitHub token used to authenticate with the GitHub API to download artifacts from a different repository or from a different workflow run.
// Default: - If unspecified, the action will download artifacts from the current repo and the current workflow run.
//
// Experimental.
Token *string `field:"optional" json:"token" yaml:"token"`
}
Experimental.
type GitHub ¶
type GitHub interface {
projen.Component
// The GitHub Actions provider used to manage the versions of actions used in steps.
// Experimental.
Actions() GitHubActionsProvider
// Whether downloading from LFS is enabled for this GitHub project.
// Experimental.
DownloadLfs() *bool
// The `MergeQueue` component configured on this repository This is `undefined` if merge queues are not enabled for this repository.
// Experimental.
MergeQueue() MergeQueue
// The `Mergify` component configured on this repository This is `undefined` if Mergify is not enabled for this repository.
// Experimental.
Mergify() Mergify
// The tree node.
// Experimental.
Node() constructs.Node
// Experimental.
Project() projen.Project
// GitHub API authentication method used by projen workflows.
// Experimental.
ProjenCredentials() GithubCredentials
// All workflows.
// Experimental.
Workflows() *[]GithubWorkflow
// Are workflows enabled?
// Experimental.
WorkflowsEnabled() *bool
// Experimental.
AddDependabot(options *DependabotOptions) Dependabot
// Experimental.
AddPullRequestTemplate(content ...*string) PullRequestTemplate
// Adds a workflow to the project.
//
// Returns: a GithubWorkflow instance.
// Experimental.
AddWorkflow(name *string) GithubWorkflow
// Called after synthesis.
//
// Order is *not* guaranteed.
// Experimental.
PostSynthesize()
// Called before synthesis.
// Experimental.
PreSynthesize()
// Synthesizes files to the project output directory.
// Experimental.
Synthesize()
// Returns a string representation of this construct.
// Experimental.
ToString() *string
// Finds a GitHub workflow by name.
//
// Returns `undefined` if the workflow cannot be found.
// Experimental.
TryFindWorkflow(name *string) GithubWorkflow
}
Experimental.
type GitHubActionsProvider ¶
type GitHubActionsProvider interface {
// Resolve an action name to the version that should be used, taking into account any overrides.
// Experimental.
Get(action *string) *string
// Define an override for a given action.
//
// Specify the action name without a version to override all usages of the action.
// You can also override a specific action version, by providing the version string.
// Specific overrides take precedence over overrides without a version.
//
// If an override for the same action name is set multiple times, the last override is used.
//
// Example:
// // Force any use of `actions/checkout` to use a pin a specific commit
// project.github.actions.set("actions/checkout", "actions/checkout@aaaaaa");
//
// // But pin usage of `v4` to a different commit
// project.github.actions.set("actions/checkout@v4", "actions/checkout@ffffff");
//
// Experimental.
Set(action *string, override *string)
}
Manage the versions used for GitHub Actions used in steps. Experimental.
type GitHubOptions ¶
type GitHubOptions struct {
// Download files in LFS in workflows.
// Default: true if the associated project has `lfsPatterns`, `false` otherwise.
//
// Experimental.
DownloadLfs *bool `field:"optional" json:"downloadLfs" yaml:"downloadLfs"`
// Whether a merge queue should be used on this repository to merge pull requests.
//
// Requires additional configuration of the repositories branch protection rules.
// Default: false.
//
// Experimental.
MergeQueue *bool `field:"optional" json:"mergeQueue" yaml:"mergeQueue"`
// Options for MergeQueue.
// Default: - default options.
//
// Experimental.
MergeQueueOptions *MergeQueueOptions `field:"optional" json:"mergeQueueOptions" yaml:"mergeQueueOptions"`
// Whether mergify should be enabled on this repository or not.
// Default: true.
//
// Experimental.
Mergify *bool `field:"optional" json:"mergify" yaml:"mergify"`
// Options for Mergify.
// Default: - default options.
//
// Experimental.
MergifyOptions *MergifyOptions `field:"optional" json:"mergifyOptions" yaml:"mergifyOptions"`
// Choose a method of providing GitHub API access for projen workflows.
// Default: - use a personal access token named PROJEN_GITHUB_TOKEN.
//
// Experimental.
ProjenCredentials GithubCredentials `field:"optional" json:"projenCredentials" yaml:"projenCredentials"`
// The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows.
//
// This token needs to have the `repo`, `workflows`
// and `packages` scope.
// Default: "PROJEN_GITHUB_TOKEN".
//
// Deprecated: - use `projenCredentials`.
ProjenTokenSecret *string `field:"optional" json:"projenTokenSecret" yaml:"projenTokenSecret"`
// Add a workflow that allows backport of PRs to other branches using labels.
//
// When opening a new PR add a backport label to it,
// and the PR will be backported to the target branches once the PR is merged.
//
// Should not be used together with mergify.
// Default: false.
//
// Experimental.
PullRequestBackport *bool `field:"optional" json:"pullRequestBackport" yaml:"pullRequestBackport"`
// Options for configuring pull request backport.
// Default: - see defaults in `PullRequestBackportOptions`.
//
// Experimental.
PullRequestBackportOptions *PullRequestBackportOptions `field:"optional" json:"pullRequestBackportOptions" yaml:"pullRequestBackportOptions"`
// Add a workflow that performs basic checks for pull requests, like validating that PRs follow Conventional Commits.
// Default: true.
//
// Experimental.
PullRequestLint *bool `field:"optional" json:"pullRequestLint" yaml:"pullRequestLint"`
// Options for configuring a pull request linter.
// Default: - see defaults in `PullRequestLintOptions`.
//
// Experimental.
PullRequestLintOptions *PullRequestLintOptions `field:"optional" json:"pullRequestLintOptions" yaml:"pullRequestLintOptions"`
// Enables GitHub workflows.
//
// If this is set to `false`, workflows will not be created.
// Default: true.
//
// Experimental.
Workflows *bool `field:"optional" json:"workflows" yaml:"workflows"`
}
Experimental.
type GitHubProject ¶
type GitHubProject interface {
projen.Project
// Auto approve set up for this project.
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
AutoApprove() AutoApprove
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
BuildTask() projen.Task
// Whether to commit the managed files by default.
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
CommitGenerated() *bool
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
CompileTask() projen.Task
// Returns all the components within this project.
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
Components() *[]projen.Component
// This is the "default" task, the one that executes "projen".
//
// Undefined if
// the project is being ejected.
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
DefaultTask() projen.Task
// Project dependencies.
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
Deps() projen.Dependencies
// Access for .devcontainer.json (used for GitHub Codespaces).
//
// This will be `undefined` if devContainer boolean is false.
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
DevContainer() vscode.DevContainer
// Whether or not the project is being ejected.
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
Ejected() *bool
// All files in this project.
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
Files() *[]projen.FileBase
// The .gitattributes file for this repository.
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
Gitattributes() projen.GitAttributesFile
// Access all github components.
//
// This will be `undefined` for subprojects.
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
Github() GitHub
// .gitignore.
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
Gitignore() projen.IgnoreFile
// Access for Gitpod.
//
// This will be `undefined` if gitpod boolean is false.
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
Gitpod() projen.Gitpod
// The options used when this project is bootstrapped via `projen new`.
//
// It
// includes the original set of options passed to the CLI and also the JSII
// FQN of the project type.
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
InitProject() *projen.InitProject
// Logging utilities.
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
Logger() projen.Logger
// Project name.
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
Name() *string
// The tree node.
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
Node() constructs.Node
// Absolute output directory of this project.
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
Outdir() *string
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
PackageTask() projen.Task
// A parent project.
//
// If undefined, this is the root project.
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
Parent() projen.Project
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
PostCompileTask() projen.Task
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
PreCompileTask() projen.Task
// Manages the build process of the project.
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
ProjectBuild() projen.ProjectBuild
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
ProjectType() projen.ProjectType
// The command to use in order to run the projen CLI.
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
ProjenCommand() *string
// The root project.
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
Root() projen.Project
// Returns all the subprojects within this project.
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
Subprojects() *[]projen.Project
// Project tasks.
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
Tasks() projen.Tasks
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
TestTask() projen.Task
// Access all VSCode components.
//
// This will be `undefined` for subprojects.
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
Vscode() vscode.VsCode
// Exclude the matching files from pre-synth cleanup.
//
// Can be used when, for example, some
// source files include the projen marker and we don't want them to be erased during synth.
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
AddExcludeFromCleanup(globs ...*string)
// Adds a .gitignore pattern.
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
AddGitIgnore(pattern *string)
// Exclude these files from the bundled package.
//
// Implemented by project types based on the
// packaging mechanism. For example, `NodeProject` delegates this to `.npmignore`.
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
AddPackageIgnore(_pattern *string)
// Adds a new task to this project.
//
// This will fail if the project already has
// a task with this name.
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
AddTask(name *string, props *projen.TaskOptions) projen.Task
// Prints a "tip" message during synthesis.
// Deprecated: - use `project.logger.info(message)` to show messages during synthesis
AddTip(message *string)
// Marks the provided file(s) as being generated.
//
// This is achieved using the
// github-linguist attributes. Generated files do not count against the
// repository statistics and language breakdown.
// See: https://github.com/github/linguist/blob/master/docs/overrides.md
//
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
AnnotateGenerated(glob *string)
// Called after all components are synthesized.
//
// Order is *not* guaranteed.
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
PostSynthesize()
// Called before all components are synthesized.
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
PreSynthesize()
// Removes a task from a project.
//
// Returns: The `Task` that was removed, otherwise `undefined`.
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
RemoveTask(name *string) projen.Task
// Returns the shell command to execute in order to run a task.
//
// By default, this is `npx projen@<version> <task>`.
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
RunTaskCommand(task projen.Task) *string
// Synthesize all project files into `outdir`.
//
// 1. Call "this.preSynthesize()"
// 2. Delete all generated files
// 3. Synthesize all subprojects
// 4. Synthesize all components of this project
// 5. Call "postSynthesize()" for all components of this project
// 6. Call "this.postSynthesize()"
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
Synth()
// Returns a string representation of this construct.
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
ToString() *string
// Finds a file at the specified relative path within this project and all its subprojects.
//
// Returns: a `FileBase` or undefined if there is no file in that path.
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
TryFindFile(filePath *string) projen.FileBase
// Finds a json file by name.
// Deprecated: use `tryFindObjectFile`.
TryFindJsonFile(filePath *string) projen.JsonFile
// Finds an object file (like JsonFile, YamlFile, etc.) by name.
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
TryFindObjectFile(filePath *string) projen.ObjectFile
// Finds a file at the specified relative path within this project and removes it.
//
// Returns: a `FileBase` if the file was found and removed, or undefined if
// the file was not found.
// Deprecated: This is a *temporary* class. At the moment, our base project
// types such as `NodeProject` and `JavaProject` are derived from this, but we
// want to be able to use these project types outside of GitHub as well. One of
// the next steps to address this is to abstract workflows so that different
// "engines" can be used to implement our CI/CD solutions.
TryRemoveFile(filePath *string) projen.FileBase
}
GitHub-based project. Deprecated: This is a *temporary* class. At the moment, our base project types such as `NodeProject` and `JavaProject` are derived from this, but we want to be able to use these project types outside of GitHub as well. One of the next steps to address this is to abstract workflows so that different "engines" can be used to implement our CI/CD solutions.
func NewGitHubProject
deprecated
func NewGitHubProject(options *GitHubProjectOptions) GitHubProject
Deprecated: This is a *temporary* class. At the moment, our base project types such as `NodeProject` and `JavaProject` are derived from this, but we want to be able to use these project types outside of GitHub as well. One of the next steps to address this is to abstract workflows so that different "engines" can be used to implement our CI/CD solutions.
type GitHubProjectOptions ¶
type GitHubProjectOptions struct {
// This is the name of your project.
// Default: $BASEDIR.
//
// Experimental.
Name *string `field:"required" json:"name" yaml:"name"`
// Whether to commit the managed files by default.
// Default: true.
//
// Experimental.
CommitGenerated *bool `field:"optional" json:"commitGenerated" yaml:"commitGenerated"`
// Configuration options for .gitignore file.
// Experimental.
GitIgnoreOptions *projen.IgnoreFileOptions `field:"optional" json:"gitIgnoreOptions" yaml:"gitIgnoreOptions"`
// Configuration options for git.
// Experimental.
GitOptions *projen.GitOptions `field:"optional" json:"gitOptions" yaml:"gitOptions"`
// Configure logging options such as verbosity.
// Default: {}.
//
// Experimental.
Logging *projen.LoggerOptions `field:"optional" json:"logging" yaml:"logging"`
// The root directory of the project.
//
// Relative to this directory, all files are synthesized.
//
// If this project has a parent, this directory is relative to the parent
// directory and it cannot be the same as the parent or any of it's other
// subprojects.
// Default: "."
//
// Experimental.
Outdir *string `field:"optional" json:"outdir" yaml:"outdir"`
// The parent project, if this project is part of a bigger project.
// Experimental.
Parent projen.Project `field:"optional" json:"parent" yaml:"parent"`
// The shell command to use in order to run the projen CLI.
//
// Can be used to customize in special environments.
// Default: "npx projen".
//
// Experimental.
ProjenCommand *string `field:"optional" json:"projenCommand" yaml:"projenCommand"`
// Generate (once) .projenrc.json (in JSON). Set to `false` in order to disable .projenrc.json generation.
// Default: false.
//
// Experimental.
ProjenrcJson *bool `field:"optional" json:"projenrcJson" yaml:"projenrcJson"`
// Options for .projenrc.json.
// Default: - default options.
//
// Experimental.
ProjenrcJsonOptions *projen.ProjenrcJsonOptions `field:"optional" json:"projenrcJsonOptions" yaml:"projenrcJsonOptions"`
// Use renovatebot to handle dependency upgrades.
// Default: false.
//
// Experimental.
Renovatebot *bool `field:"optional" json:"renovatebot" yaml:"renovatebot"`
// Options for renovatebot.
// Default: - default options.
//
// Experimental.
RenovatebotOptions *projen.RenovatebotOptions `field:"optional" json:"renovatebotOptions" yaml:"renovatebotOptions"`
// Enable and configure the 'auto approve' workflow.
// Default: - auto approve is disabled.
//
// Experimental.
AutoApproveOptions *AutoApproveOptions `field:"optional" json:"autoApproveOptions" yaml:"autoApproveOptions"`
// Enable automatic merging on GitHub.
//
// Has no effect if `github.mergify`
// is set to false.
// Default: true.
//
// Experimental.
AutoMerge *bool `field:"optional" json:"autoMerge" yaml:"autoMerge"`
// Configure options for automatic merging on GitHub.
//
// Has no effect if
// `github.mergify` or `autoMerge` is set to false.
// Default: - see defaults in `AutoMergeOptions`.
//
// Experimental.
AutoMergeOptions *AutoMergeOptions `field:"optional" json:"autoMergeOptions" yaml:"autoMergeOptions"`
// Add a `clobber` task which resets the repo to origin.
// Default: - true, but false for subprojects.
//
// Experimental.
Clobber *bool `field:"optional" json:"clobber" yaml:"clobber"`
// Add a VSCode development environment (used for GitHub Codespaces).
// Default: false.
//
// Experimental.
DevContainer *bool `field:"optional" json:"devContainer" yaml:"devContainer"`
// Enable GitHub integration.
//
// Enabled by default for root projects. Disabled for non-root projects.
// Default: true.
//
// Experimental.
Github *bool `field:"optional" json:"github" yaml:"github"`
// Options for GitHub integration.
// Default: - see GitHubOptions.
//
// Experimental.
GithubOptions *GitHubOptions `field:"optional" json:"githubOptions" yaml:"githubOptions"`
// Add a Gitpod development environment.
// Default: false.
//
// Experimental.
Gitpod *bool `field:"optional" json:"gitpod" yaml:"gitpod"`
// Whether mergify should be enabled on this repository or not.
// Default: true.
//
// Deprecated: use `githubOptions.mergify` instead
Mergify *bool `field:"optional" json:"mergify" yaml:"mergify"`
// Options for mergify.
// Default: - default options.
//
// Deprecated: use `githubOptions.mergifyOptions` instead
MergifyOptions *MergifyOptions `field:"optional" json:"mergifyOptions" yaml:"mergifyOptions"`
// Which type of project this is (library/app).
// Default: ProjectType.UNKNOWN
//
// Deprecated: no longer supported at the base project level.
ProjectType projen.ProjectType `field:"optional" json:"projectType" yaml:"projectType"`
// Choose a method of providing GitHub API access for projen workflows.
// Default: - use a personal access token named PROJEN_GITHUB_TOKEN.
//
// Experimental.
ProjenCredentials GithubCredentials `field:"optional" json:"projenCredentials" yaml:"projenCredentials"`
// The name of a secret which includes a GitHub Personal Access Token to be used by projen workflows.
//
// This token needs to have the `repo`, `workflows`
// and `packages` scope.
// Default: "PROJEN_GITHUB_TOKEN".
//
// Deprecated: use `projenCredentials`.
ProjenTokenSecret *string `field:"optional" json:"projenTokenSecret" yaml:"projenTokenSecret"`
// The README setup.
//
// Example:
// "{ filename: 'readme.md', contents: '# title' }"
//
// Default: - { filename: 'README.md', contents: '# replace this' }
//
// Experimental.
Readme *projen.SampleReadmeProps `field:"optional" json:"readme" yaml:"readme"`
// Auto-close of stale issues and pull request.
//
// See `staleOptions` for options.
// Default: false.
//
// Experimental.
Stale *bool `field:"optional" json:"stale" yaml:"stale"`
// Auto-close stale issues and pull requests.
//
// To disable set `stale` to `false`.
// Default: - see defaults in `StaleOptions`.
//
// Experimental.
StaleOptions *StaleOptions `field:"optional" json:"staleOptions" yaml:"staleOptions"`
// Enable VSCode integration.
//
// Enabled by default for root projects. Disabled for non-root projects.
// Default: true.
//
// Experimental.
Vscode *bool `field:"optional" json:"vscode" yaml:"vscode"`
}
Options for `GitHubProject`. Experimental.
type GitIdentity ¶
type GitIdentity struct {
// The email address of the git user.
// Experimental.
Email *string `field:"required" json:"email" yaml:"email"`
// The name of the user.
// Experimental.
Name *string `field:"required" json:"name" yaml:"name"`
}
Represents the git identity. Experimental.
type GithubCredentials ¶
type GithubCredentials interface {
// Setup steps to obtain GitHub credentials.
// Experimental.
SetupSteps() *[]*workflows.JobStep
// The value to use in a workflow when a GitHub token is expected.
//
// This
// typically looks like "${{ some.path.to.a.value }}".
// Experimental.
TokenRef() *string
}
Represents a method of providing GitHub API access for projen workflows. Experimental.
func GithubCredentials_FromApp ¶
func GithubCredentials_FromApp(options *GithubCredentialsAppOptions) GithubCredentials
Provide API access through a GitHub App.
The GitHub App must be installed on the GitHub repo, its App ID and a private key must be added as secrets to the repo. The name of the secrets can be specified here. See: https://projen.io/docs/integrations/github/#github-app
Default: - app id stored in "PROJEN_APP_ID" and private key stored in "PROJEN_APP_PRIVATE_KEY" with all permissions attached to the app.
Experimental.
func GithubCredentials_FromPersonalAccessToken ¶
func GithubCredentials_FromPersonalAccessToken(options *GithubCredentialsPersonalAccessTokenOptions) GithubCredentials
Provide API access through a GitHub personal access token.
The token must be added as a secret to the GitHub repo, and the name of the secret can be specified here. See: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
Default: - a secret named "PROJEN_GITHUB_TOKEN".
Experimental.
type GithubCredentialsAppOptions ¶
type GithubCredentialsAppOptions struct {
// Experimental.
AppIdSecret *string `field:"optional" json:"appIdSecret" yaml:"appIdSecret"`
// The permissions granted to the token.
// Default: - all permissions granted to the app.
//
// Experimental.
Permissions *workflows.AppPermissions `field:"optional" json:"permissions" yaml:"permissions"`
// Experimental.
PrivateKeySecret *string `field:"optional" json:"privateKeySecret" yaml:"privateKeySecret"`
}
Options for `GithubCredentials.fromApp`. Experimental.
type GithubCredentialsPersonalAccessTokenOptions ¶
type GithubCredentialsPersonalAccessTokenOptions struct {
// Experimental.
Secret *string `field:"optional" json:"secret" yaml:"secret"`
}
Options for `GithubCredentials.fromPersonalAccessToken`. Experimental.
type GithubWorkflow ¶
type GithubWorkflow interface {
projen.Component
// The concurrency configuration of the workflow.
//
// undefined means no concurrency limitations.
// Experimental.
Concurrency() *ConcurrencyOptions
// The workflow YAML file.
//
// May not exist if `workflowsEnabled` is false on `GitHub`.
// Experimental.
File() projen.YamlFile
// The name of the workflow.
//
// GitHub displays the names of your workflows under your repository's
// "Actions" tab.
// See: https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#name
//
// Experimental.
Name() *string
// The tree node.
// Experimental.
Node() constructs.Node
// Experimental.
Project() projen.Project
// GitHub API authentication method used by projen workflows.
// Experimental.
ProjenCredentials() GithubCredentials
// The name for workflow runs generated from the workflow.
//
// GitHub displays the
// workflow run name in the list of workflow runs on your repository's
// "Actions" tab. If `run-name` is omitted or is only whitespace, then the run
// name is set to event-specific information for the workflow run. For
// example, for a workflow triggered by a `push` or `pull_request` event, it
// is set as the commit message.
//
// This value can include expressions and can reference `github` and `inputs`
// contexts.
// Experimental.
RunName() *string
// Experimental.
SetRunName(val *string)
// Adds a single job to the workflow.
// Experimental.
AddJob(id *string, job interface{})
// Add jobs to the workflow.
// Experimental.
AddJobs(jobs *map[string]interface{})
// Get a single job from the workflow.
// Experimental.
GetJob(id *string) interface{}
// Add events to triggers the workflow.
// Experimental.
On(events *workflows.Triggers)
// Called after synthesis.
//
// Order is *not* guaranteed.
// Experimental.
PostSynthesize()
// Called before synthesis.
// Experimental.
PreSynthesize()
// Removes a single job to the workflow.
// Experimental.
RemoveJob(id *string)
// Synthesizes files to the project output directory.
// Experimental.
Synthesize()
// Returns a string representation of this construct.
// Experimental.
ToString() *string
// Updates a single job to the workflow.
// Experimental.
UpdateJob(id *string, job interface{})
// Updates jobs for this worklow Does a complete replace, it does not try to merge the jobs.
// Experimental.
UpdateJobs(jobs *map[string]interface{})
}
Workflow for GitHub.
A workflow is a configurable automated process made up of one or more jobs. See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
Experimental.
func NewGithubWorkflow ¶
func NewGithubWorkflow(github GitHub, name *string, options *GithubWorkflowOptions) GithubWorkflow
Experimental.
type GithubWorkflowOptions ¶
type GithubWorkflowOptions struct {
// Concurrency ensures that only a single job or workflow using the same concurrency group will run at a time.
//
// Currently in beta.
// See: https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#concurrency
//
// Default: - { group: ${{ github.workflow }}, cancelInProgress: false }
//
// Experimental.
ConcurrencyOptions *ConcurrencyOptions `field:"optional" json:"concurrencyOptions" yaml:"concurrencyOptions"`
// Set a custom file name for the workflow definition file. Must include either a .yml or .yaml file extension.
//
// Use this option to set a file name for the workflow file, that is different than the display name.
//
// Example:
// "my-workflow.yaml"
//
// Default: - a path-safe version of the workflow name plus the .yml file ending, e.g. build.yml
//
// Experimental.
FileName *string `field:"optional" json:"fileName" yaml:"fileName"`
// Force the creation of the workflow even if `workflows` is disabled in `GitHub`.
// Default: false.
//
// Experimental.
Force *bool `field:"optional" json:"force" yaml:"force"`
// Enable concurrency limitations.
//
// Use `concurrencyOptions` to configure specific non default values.
// Default: false.
//
// Experimental.
LimitConcurrency *bool `field:"optional" json:"limitConcurrency" yaml:"limitConcurrency"`
}
Options for `GithubWorkflow`. Experimental.
type IAddConditionsLater ¶
type IAddConditionsLater interface {
// Experimental.
Render() *[]*string
}
Experimental.
type MergeMethod ¶ added in v0.88.6
type MergeMethod string
The merge method used to add the PR to the merge queue.
Behavior can be further configured in repository settings. Experimental.
const ( // Experimental. MergeMethod_SQUASH MergeMethod = "SQUASH" // Experimental. MergeMethod_MERGE MergeMethod = "MERGE" // Experimental. MergeMethod_REBASE MergeMethod = "REBASE" )
type MergeQueue ¶ added in v0.88.6
type MergeQueue interface {
projen.Component
// The tree node.
// Experimental.
Node() constructs.Node
// Experimental.
Project() projen.Project
// Called after synthesis.
//
// Order is *not* guaranteed.
// Experimental.
PostSynthesize()
// Called before synthesis.
// Experimental.
PreSynthesize()
// Synthesizes files to the project output directory.
// Experimental.
Synthesize()
// Returns a string representation of this construct.
// Experimental.
ToString() *string
}
Merge pull requests using a merge queue. Experimental.
func NewMergeQueue ¶ added in v0.88.6
func NewMergeQueue(scope constructs.IConstruct, options *MergeQueueOptions) MergeQueue
Experimental.
type MergeQueueOptions ¶ added in v0.88.6
type MergeQueueOptions struct {
// Should pull requests be queued automatically to be merged once they pass required checks.
// Default: true.
//
// Experimental.
AutoQueue *bool `field:"optional" json:"autoQueue" yaml:"autoQueue"`
// Configure auto-queue pull requests.
// Default: - see AutoQueueOptions.
//
// Experimental.
AutoQueueOptions *AutoQueueOptions `field:"optional" json:"autoQueueOptions" yaml:"autoQueueOptions"`
// The branches that can be merged into using MergeQueue.
// Default: - all branches.
//
// Experimental.
TargetBranches *[]*string `field:"optional" json:"targetBranches" yaml:"targetBranches"`
}
Options for 'MergeQueue'. Experimental.
type Mergify ¶
type Mergify interface {
projen.Component
// The tree node.
// Experimental.
Node() constructs.Node
// Experimental.
Project() projen.Project
// Experimental.
AddQueue(queue *MergifyQueue)
// Experimental.
AddRule(rule *MergifyRule)
// Called after synthesis.
//
// Order is *not* guaranteed.
// Experimental.
PostSynthesize()
// Called before synthesis.
// Experimental.
PreSynthesize()
// Synthesizes files to the project output directory.
// Experimental.
Synthesize()
// Returns a string representation of this construct.
// Experimental.
ToString() *string
}
Experimental.
type MergifyConditionalOperator ¶
type MergifyConditionalOperator struct {
// Experimental.
And *[]interface{} `field:"optional" json:"and" yaml:"and"`
// Experimental.
Or *[]interface{} `field:"optional" json:"or" yaml:"or"`
}
The Mergify conditional operators that can be used are: `or` and `and`.
Note: The number of nested conditions is limited to 3. See: https://docs.mergify.io/conditions/#combining-conditions-with-operators
Experimental.
type MergifyOptions ¶
type MergifyOptions struct {
// Experimental.
Queues *[]*MergifyQueue `field:"optional" json:"queues" yaml:"queues"`
// Experimental.
Rules *[]*MergifyRule `field:"optional" json:"rules" yaml:"rules"`
}
Experimental.
type MergifyQueue ¶
type MergifyQueue struct {
// Template to use as the commit message when using the merge or squash merge method.
// Experimental.
CommitMessageTemplate *string `field:"required" json:"commitMessageTemplate" yaml:"commitMessageTemplate"`
// A list of Conditions string that must match against the pull request for the pull request to be added to the queue.
// See: https://docs.mergify.com/conditions/#conditions
//
// Experimental.
Conditions *[]interface{} `field:"required" json:"conditions" yaml:"conditions"`
// The name of the queue.
// Experimental.
Name *string `field:"required" json:"name" yaml:"name"`
// Merge method to use.
//
// Possible values are `merge`, `squash`, `rebase` or `fast-forward`.
// `fast-forward` is not supported on queues with `speculative_checks` > 1, `batch_size` > 1, or with `allow_inplace_checks` set to false.
// Default: "merge".
//
// Experimental.
MergeMethod *string `field:"optional" json:"mergeMethod" yaml:"mergeMethod"`
// Method to use to update the pull request with its base branch when the speculative check is done in-place.
//
// Possible values:
// - `merge` to merge the base branch into the pull request.
// - `rebase` to rebase the pull request against its base branch.
//
// Note that the `rebase` method has some drawbacks, see Mergify docs for details.
// See: https://docs.mergify.com/actions/queue/#queue-rules
//
// Default: - `merge` for all merge methods except `fast-forward` where `rebase` is used.
//
// Experimental.
UpdateMethod *string `field:"optional" json:"updateMethod" yaml:"updateMethod"`
}
Experimental.
type MergifyRule ¶
type MergifyRule struct {
// A dictionary made of Actions that will be executed on the matching pull requests.
// See: https://docs.mergify.io/actions/#actions
//
// Experimental.
Actions *map[string]interface{} `field:"required" json:"actions" yaml:"actions"`
// A list of Conditions string that must match against the pull request for the rule to be applied.
// See: https://docs.mergify.io/conditions/#conditions
//
// Experimental.
Conditions *[]interface{} `field:"required" json:"conditions" yaml:"conditions"`
// The name of the rule.
//
// This is not used by the engine directly,
// but is used when reporting information about a rule.
// Experimental.
Name *string `field:"required" json:"name" yaml:"name"`
}
Experimental.
type PullRequestBackport ¶ added in v0.81.13
type PullRequestBackport interface {
projen.Component
// Experimental.
File() projen.JsonFile
// The tree node.
// Experimental.
Node() constructs.Node
// Experimental.
Project() projen.Project
// Experimental.
Workflow() GithubWorkflow
// Called after synthesis.
//
// Order is *not* guaranteed.
// Experimental.
PostSynthesize()
// Called before synthesis.
// Experimental.
PreSynthesize()
// Synthesizes files to the project output directory.
// Experimental.
Synthesize()
// Returns a string representation of this construct.
// Experimental.
ToString() *string
}
Experimental.
func NewPullRequestBackport ¶ added in v0.81.13
func NewPullRequestBackport(scope constructs.IConstruct, options *PullRequestBackportOptions) PullRequestBackport
Experimental.
type PullRequestBackportOptions ¶ added in v0.81.13
type PullRequestBackportOptions struct {
// Automatically approve backport PRs if the 'auto approve' workflow is available.
// Default: true.
//
// Experimental.
AutoApproveBackport *bool `field:"optional" json:"autoApproveBackport" yaml:"autoApproveBackport"`
// The prefix used to name backport branches.
//
// Make sure to include a separator at the end like `/` or `_`.
// Default: "backport/".
//
// Experimental.
BackportBranchNamePrefix *string `field:"optional" json:"backportBranchNamePrefix" yaml:"backportBranchNamePrefix"`
// The labels added to the created backport PR.
// Default: ["backport"].
//
// Experimental.
BackportPRLabels *[]*string `field:"optional" json:"backportPRLabels" yaml:"backportPRLabels"`
// List of branches that can be a target for backports.
// Default: - allow backports to all release branches.
//
// Experimental.
Branches *[]*string `field:"optional" json:"branches" yaml:"branches"`
// Should this created Backport PRs with conflicts.
//
// Conflicts will have to be resolved manually, but a PR is always created.
// Set to `false` to prevent the backport PR from being created if there are conflicts.
// Default: true.
//
// Experimental.
CreateWithConflicts *bool `field:"optional" json:"createWithConflicts" yaml:"createWithConflicts"`
// The prefix used to detect PRs that should be backported.
// Default: "backport-to-".
//
// Experimental.
LabelPrefix *string `field:"optional" json:"labelPrefix" yaml:"labelPrefix"`
// The name of the workflow.
// Default: "backport".
//
// Experimental.
WorkflowName *string `field:"optional" json:"workflowName" yaml:"workflowName"`
}
Experimental.
type PullRequestFromPatchOptions ¶
type PullRequestFromPatchOptions struct {
// Description added to the pull request.
//
// Providence information are automatically added.
// Experimental.
PullRequestDescription *string `field:"required" json:"pullRequestDescription" yaml:"pullRequestDescription"`
// The full title used to create the pull request.
//
// If PR titles are validated in this repo, the title should comply with the respective rules.
// Experimental.
PullRequestTitle *string `field:"required" json:"pullRequestTitle" yaml:"pullRequestTitle"`
// The name of the workflow that will create the PR.
// Experimental.
WorkflowName *string `field:"required" json:"workflowName" yaml:"workflowName"`
// Assignees to add on the PR.
// Default: - no assignees.
//
// Experimental.
Assignees *[]*string `field:"optional" json:"assignees" yaml:"assignees"`
// Sets the pull request base branch.
// Default: - The branch checked out in the workflow.
//
// Experimental.
BaseBranch *string `field:"optional" json:"baseBranch" yaml:"baseBranch"`
// The pull request branch name.
// Default: `github-actions/${options.workflowName}`
//
// Experimental.
BranchName *string `field:"optional" json:"branchName" yaml:"branchName"`
// The job credentials used to create the pull request.
//
// Provided credentials must have permissions to create a pull request on the repository.
// Experimental.
Credentials GithubCredentials `field:"optional" json:"credentials" yaml:"credentials"`
// The git identity used to create the commit.
// Default: - the default github-actions user.
//
// Experimental.
GitIdentity *GitIdentity `field:"optional" json:"gitIdentity" yaml:"gitIdentity"`
// Labels to apply on the PR.
// Default: - no labels.
//
// Experimental.
Labels *[]*string `field:"optional" json:"labels" yaml:"labels"`
// Add Signed-off-by line by the committer at the end of the commit log message.
// Default: true.
//
// Experimental.
Signoff *bool `field:"optional" json:"signoff" yaml:"signoff"`
// The step ID which produces the output which indicates if a patch was created.
// Default: "create_pr".
//
// Experimental.
StepId *string `field:"optional" json:"stepId" yaml:"stepId"`
// The name of the step displayed on GitHub.
// Default: "Create Pull Request".
//
// Experimental.
StepName *string `field:"optional" json:"stepName" yaml:"stepName"`
// Information about the patch that is used to create the pull request.
// Experimental.
Patch *PullRequestPatchSource `field:"required" json:"patch" yaml:"patch"`
// The name of the job displayed on GitHub.
// Default: "Create Pull Request".
//
// Experimental.
JobName *string `field:"optional" json:"jobName" yaml:"jobName"`
// Github Runner selection labels.
// Default: ["ubuntu-latest"].
//
// Experimental.
RunsOn *[]*string `field:"optional" json:"runsOn" yaml:"runsOn"`
// Github Runner Group selection options.
// Experimental.
RunsOnGroup *projen.GroupRunnerOptions `field:"optional" json:"runsOnGroup" yaml:"runsOnGroup"`
}
Experimental.
type PullRequestLint ¶
type PullRequestLint interface {
projen.Component
// The tree node.
// Experimental.
Node() constructs.Node
// Experimental.
Project() projen.Project
// Called after synthesis.
//
// Order is *not* guaranteed.
// Experimental.
PostSynthesize()
// Called before synthesis.
// Experimental.
PreSynthesize()
// Synthesizes files to the project output directory.
// Experimental.
Synthesize()
// Returns a string representation of this construct.
// Experimental.
ToString() *string
}
Configure validations to run on GitHub pull requests.
Only generates a file if at least one linter is configured. Experimental.
func NewPullRequestLint ¶
func NewPullRequestLint(github GitHub, options *PullRequestLintOptions) PullRequestLint
Experimental.
type PullRequestLintOptions ¶
type PullRequestLintOptions struct {
// Require a contributor statement to be included in the PR description.
//
// For example confirming that the contribution has been made by the contributor and complies with the project's license.
//
// Appends the statement to the end of the Pull Request template.
// Default: - no contributor statement is required.
//
// Experimental.
ContributorStatement *string `field:"optional" json:"contributorStatement" yaml:"contributorStatement"`
// Options for requiring a contributor statement on Pull Requests.
// Default: - none.
//
// Experimental.
ContributorStatementOptions *ContributorStatementOptions `field:"optional" json:"contributorStatementOptions" yaml:"contributorStatementOptions"`
// Github Runner selection labels.
// Default: ["ubuntu-latest"].
//
// Experimental.
RunsOn *[]*string `field:"optional" json:"runsOn" yaml:"runsOn"`
// Github Runner Group selection options.
// Experimental.
RunsOnGroup *projen.GroupRunnerOptions `field:"optional" json:"runsOnGroup" yaml:"runsOnGroup"`
// Validate that pull request titles follow Conventional Commits.
// See: https://www.conventionalcommits.org/
//
// Default: true.
//
// Experimental.
SemanticTitle *bool `field:"optional" json:"semanticTitle" yaml:"semanticTitle"`
// Options for validating the conventional commit title linter.
// Default: - title must start with "feat", "fix", or "chore".
//
// Experimental.
SemanticTitleOptions *SemanticTitleOptions `field:"optional" json:"semanticTitleOptions" yaml:"semanticTitleOptions"`
}
Options for PullRequestLint. Experimental.
type PullRequestPatchSource ¶
type PullRequestPatchSource struct {
// Number of commits to fetch.
//
// 0 indicates all history for all branches and tags.
// Default: 1.
//
// Experimental.
FetchDepth *float64 `field:"optional" json:"fetchDepth" yaml:"fetchDepth"`
// Whether LFS is enabled for the GitHub repository.
// Default: false.
//
// Experimental.
Lfs *bool `field:"optional" json:"lfs" yaml:"lfs"`
// Relative path under $GITHUB_WORKSPACE to place the repository.
// Default: - $GITHUB_WORKSPACE.
//
// Experimental.
Path *string `field:"optional" json:"path" yaml:"path"`
// Branch or tag name.
// Default: - the default branch is implicitly used.
//
// Experimental.
Ref *string `field:"optional" json:"ref" yaml:"ref"`
// The repository (owner/repo) to use.
// Default: - the default repository is implicitly used.
//
// Experimental.
Repository *string `field:"optional" json:"repository" yaml:"repository"`
// A GitHub token to use when checking out the repository.
//
// If the intent is to push changes back to the branch, then you must use a
// PAT with `repo` (and possibly `workflows`) permissions.
// Default: - the default GITHUB_TOKEN is implicitly used.
//
// Experimental.
Token *string `field:"optional" json:"token" yaml:"token"`
// The name of the artifact the patch is stored as.
// Default: ".repo.patch"
//
// Experimental.
PatchFile *string `field:"optional" json:"patchFile" yaml:"patchFile"`
// The id of the job that created the patch file.
// Experimental.
JobId *string `field:"required" json:"jobId" yaml:"jobId"`
// The name of the output that indicates if a patch has been created.
// Experimental.
OutputName *string `field:"required" json:"outputName" yaml:"outputName"`
}
Experimental.
type PullRequestTemplate ¶
type PullRequestTemplate interface {
projen.TextFile
// The absolute path of this file.
// Experimental.
AbsolutePath() *string
// Indicates if the file has been changed during synthesis.
//
// This property is
// only available in `postSynthesize()` hooks. If this is `undefined`, the
// file has not been synthesized yet.
// Experimental.
Changed() *bool
// Indicates if the file should be marked as executable.
// Experimental.
Executable() *bool
// Experimental.
SetExecutable(val *bool)
// The projen marker, used to identify files as projen-generated.
//
// Value is undefined if the project is being ejected.
// Experimental.
Marker() *string
// The tree node.
// Experimental.
Node() constructs.Node
// The file path, relative to the project's outdir.
// Experimental.
Path() *string
// Experimental.
Project() projen.Project
// Indicates if the file should be read-only or read-write.
// Experimental.
Readonly() *bool
// Experimental.
SetReadonly(val *bool)
// Adds a line to the text file.
// Experimental.
AddLine(line *string)
// Called after synthesis.
//
// Order is *not* guaranteed.
// Experimental.
PostSynthesize()
// Called before synthesis.
// Experimental.
PreSynthesize()
// Writes the file to the project's output directory.
// Experimental.
Synthesize()
// Implemented by derived classes and returns the contents of the file to emit.
// Experimental.
SynthesizeContent(_arg projen.IResolver) *string
// Returns a string representation of this construct.
// Experimental.
ToString() *string
}
Template for GitHub pull requests. Experimental.
func NewPullRequestTemplate ¶
func NewPullRequestTemplate(github GitHub, options *PullRequestTemplateOptions) PullRequestTemplate
Experimental.
func PullRequestTemplate_Of ¶ added in v0.72.30
func PullRequestTemplate_Of(project projen.Project) PullRequestTemplate
Returns the `PullRequestTemplate` instance associated with a project or `undefined` if there is no PullRequestTemplate.
Returns: A PullRequestTemplate. Experimental.
type PullRequestTemplateOptions ¶
type PullRequestTemplateOptions struct {
// The contents of the template.
//
// You can use `addLine()` to add additional lines.
// Default: - a standard default template will be created.
//
// Experimental.
Lines *[]*string `field:"optional" json:"lines" yaml:"lines"`
}
Options for `PullRequestTemplate`. Experimental.
type SemanticTitleOptions ¶
type SemanticTitleOptions struct {
// Configure that a scope must always be provided.
//
// e.g. feat(ui), fix(core)
// Default: false.
//
// Experimental.
RequireScope *bool `field:"optional" json:"requireScope" yaml:"requireScope"`
// Configure a list of commit types that are allowed.
// Default: ["feat", "fix", "chore"].
//
// Experimental.
Types *[]*string `field:"optional" json:"types" yaml:"types"`
}
Options for linting that PR titles follow Conventional Commits. See: https://www.conventionalcommits.org/
Experimental.
type SetupGitIdentityOptions ¶ added in v0.78.3
type SetupGitIdentityOptions struct {
// Sets environment variables for steps to use in the runner environment.
//
// You can also set environment variables for the entire workflow or a job.
// Experimental.
Env *map[string]*string `field:"optional" json:"env" yaml:"env"`
// A unique identifier for the step.
//
// You can use the id to reference the
// step in contexts.
// Experimental.
Id *string `field:"optional" json:"id" yaml:"id"`
// You can use the if conditional to prevent a job from running unless a condition is met.
//
// You can use any supported context and expression to
// create a conditional.
// Experimental.
If *string `field:"optional" json:"if" yaml:"if"`
// A name for your step to display on GitHub.
// Experimental.
Name *string `field:"optional" json:"name" yaml:"name"`
// Specifies a working directory for a step.
//
// Overrides a job's working directory.
// Experimental.
WorkingDirectory *string `field:"optional" json:"workingDirectory" yaml:"workingDirectory"`
// Prevents a job from failing when a step fails.
//
// Set to true to allow a job
// to pass when this step fails.
// Experimental.
ContinueOnError *bool `field:"optional" json:"continueOnError" yaml:"continueOnError"`
// The maximum number of minutes to run the step before killing the process.
// Experimental.
TimeoutMinutes *float64 `field:"optional" json:"timeoutMinutes" yaml:"timeoutMinutes"`
// The identity to use.
// Experimental.
GitIdentity *GitIdentity `field:"required" json:"gitIdentity" yaml:"gitIdentity"`
}
Experimental.
type Stale ¶
type Stale interface {
projen.Component
// The tree node.
// Experimental.
Node() constructs.Node
// Experimental.
Project() projen.Project
// Called after synthesis.
//
// Order is *not* guaranteed.
// Experimental.
PostSynthesize()
// Called before synthesis.
// Experimental.
PreSynthesize()
// Synthesizes files to the project output directory.
// Experimental.
Synthesize()
// Returns a string representation of this construct.
// Experimental.
ToString() *string
}
Warns and then closes issues and PRs that have had no activity for a specified amount of time.
The default configuration will:
- Add a "Stale" label to pull requests after 14 days and closed after 2 days
- Add a "Stale" label to issues after 60 days and closed after 7 days
- If a comment is added, the label will be removed and timer is restarted.
See: https://github.com/actions/stale
Experimental.
type StaleBehavior ¶
type StaleBehavior struct {
// The comment to add to the issue/PR when it's closed.
// Default: "Closing this pull request as it hasn\'t seen activity for a while. Please add a comment
//
// Experimental.
CloseMessage *string `field:"optional" json:"closeMessage" yaml:"closeMessage"`
// Days until the issue/PR is closed after it is marked as "Stale".
//
// Set to -1 to disable.
// Default: -.
//
// Experimental.
DaysBeforeClose *float64 `field:"optional" json:"daysBeforeClose" yaml:"daysBeforeClose"`
// How many days until the issue or pull request is marked as "Stale".
//
// Set to -1 to disable.
// Default: -.
//
// Experimental.
DaysBeforeStale *float64 `field:"optional" json:"daysBeforeStale" yaml:"daysBeforeStale"`
// Determines if this behavior is enabled.
//
// Same as setting `daysBeforeStale` and `daysBeforeClose` to `-1`.
// Default: true.
//
// Experimental.
Enabled *bool `field:"optional" json:"enabled" yaml:"enabled"`
// Label which exempt an issue/PR from becoming stale.
//
// Set to `[]` to disable.
// Default: - ["backlog"].
//
// Experimental.
ExemptLabels *[]*string `field:"optional" json:"exemptLabels" yaml:"exemptLabels"`
// The label to apply to the issue/PR when it becomes stale.
// Default: "stale".
//
// Experimental.
StaleLabel *string `field:"optional" json:"staleLabel" yaml:"staleLabel"`
// The comment to add to the issue/PR when it becomes stale.
// Default: "This pull request is now marked as stale because hasn\'t seen activity for a while. Add a comment or it will be closed soon."
//
// Experimental.
StaleMessage *string `field:"optional" json:"staleMessage" yaml:"staleMessage"`
}
Stale behavior. Experimental.
type StaleOptions ¶
type StaleOptions struct {
// How to handle stale issues.
// Default: - By default, stale issues with no activity will be marked as
// stale after 60 days and closed within 7 days.
//
// Experimental.
Issues *StaleBehavior `field:"optional" json:"issues" yaml:"issues"`
// How to handle stale pull requests.
// Default: - By default, pull requests with no activity will be marked as
// stale after 14 days and closed within 2 days with relevant comments.
//
// Experimental.
PullRequest *StaleBehavior `field:"optional" json:"pullRequest" yaml:"pullRequest"`
// Github Runner selection labels.
// Default: ["ubuntu-latest"].
//
// Experimental.
RunsOn *[]*string `field:"optional" json:"runsOn" yaml:"runsOn"`
// Github Runner Group selection options.
// Experimental.
RunsOnGroup *projen.GroupRunnerOptions `field:"optional" json:"runsOnGroup" yaml:"runsOnGroup"`
}
Options for `Stale`. Experimental.
type TaskWorkflow ¶
type TaskWorkflow interface {
GithubWorkflow
// Experimental.
ArtifactsDirectory() *string
// The concurrency configuration of the workflow.
//
// undefined means no concurrency limitations.
// Experimental.
Concurrency() *ConcurrencyOptions
// The workflow YAML file.
//
// May not exist if `workflowsEnabled` is false on `GitHub`.
// Experimental.
File() projen.YamlFile
// Experimental.
JobId() *string
// The name of the workflow.
//
// GitHub displays the names of your workflows under your repository's
// "Actions" tab.
// See: https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#name
//
// Experimental.
Name() *string
// The tree node.
// Experimental.
Node() constructs.Node
// Experimental.
Project() projen.Project
// GitHub API authentication method used by projen workflows.
// Experimental.
ProjenCredentials() GithubCredentials
// The name for workflow runs generated from the workflow.
//
// GitHub displays the
// workflow run name in the list of workflow runs on your repository's
// "Actions" tab. If `run-name` is omitted or is only whitespace, then the run
// name is set to event-specific information for the workflow run. For
// example, for a workflow triggered by a `push` or `pull_request` event, it
// is set as the commit message.
//
// This value can include expressions and can reference `github` and `inputs`
// contexts.
// Experimental.
RunName() *string
// Experimental.
SetRunName(val *string)
// Adds a single job to the workflow.
// Experimental.
AddJob(id *string, job interface{})
// Add jobs to the workflow.
// Experimental.
AddJobs(jobs *map[string]interface{})
// Get a single job from the workflow.
// Experimental.
GetJob(id *string) interface{}
// Add events to triggers the workflow.
// Experimental.
On(events *workflows.Triggers)
// Called after synthesis.
//
// Order is *not* guaranteed.
// Experimental.
PostSynthesize()
// Called before synthesis.
// Experimental.
PreSynthesize()
// Removes a single job to the workflow.
// Experimental.
RemoveJob(id *string)
// Synthesizes files to the project output directory.
// Experimental.
Synthesize()
// Returns a string representation of this construct.
// Experimental.
ToString() *string
// Updates a single job to the workflow.
// Experimental.
UpdateJob(id *string, job interface{})
// Updates jobs for this worklow Does a complete replace, it does not try to merge the jobs.
// Experimental.
UpdateJobs(jobs *map[string]interface{})
}
A GitHub workflow for common build tasks within a project. Experimental.
func NewTaskWorkflow ¶
func NewTaskWorkflow(github GitHub, options *TaskWorkflowOptions) TaskWorkflow
Experimental.
type TaskWorkflowJob ¶ added in v0.78.10
type TaskWorkflowJob interface {
projen.Component
// Experimental.
Concurrency() interface{}
// Experimental.
Container() *workflows.ContainerOptions
// Experimental.
ContinueOnError() *bool
// Experimental.
Defaults() *workflows.JobDefaults
// Experimental.
Env() *map[string]*string
// Experimental.
Environment() interface{}
// Experimental.
If() *string
// Experimental.
Name() *string
// Experimental.
Needs() *[]*string
// The tree node.
// Experimental.
Node() constructs.Node
// Experimental.
Outputs() *map[string]*workflows.JobStepOutput
// Experimental.
Permissions() *workflows.JobPermissions
// Experimental.
Project() projen.Project
// Experimental.
RunsOn() *[]*string
// Experimental.
RunsOnGroup() *projen.GroupRunnerOptions
// Experimental.
Services() *map[string]*workflows.ContainerOptions
// Experimental.
Steps() *[]*workflows.JobStep
// Experimental.
Strategy() *workflows.JobStrategy
// Experimental.
TimeoutMinutes() *float64
// Experimental.
Tools() *workflows.Tools
// Called after synthesis.
//
// Order is *not* guaranteed.
// Experimental.
PostSynthesize()
// Called before synthesis.
// Experimental.
PreSynthesize()
// Synthesizes files to the project output directory.
// Experimental.
Synthesize()
// Returns a string representation of this construct.
// Experimental.
ToString() *string
}
The primary or initial job of a TaskWorkflow. Experimental.
func NewTaskWorkflowJob ¶ added in v0.78.10
func NewTaskWorkflowJob(scope constructs.IConstruct, task projen.Task, options *TaskWorkflowJobOptions) TaskWorkflowJob
Experimental.
type TaskWorkflowJobOptions ¶ added in v0.78.10
type TaskWorkflowJobOptions struct {
// Permissions for the build job.
// Experimental.
Permissions *workflows.JobPermissions `field:"required" json:"permissions" yaml:"permissions"`
// A directory name which contains artifacts to be uploaded (e.g. `dist`). If this is set, the contents of this directory will be uploaded as an artifact at the end of the workflow run, even if other steps fail.
// Default: - not set.
//
// Experimental.
ArtifactsDirectory *string `field:"optional" json:"artifactsDirectory" yaml:"artifactsDirectory"`
// Override for the `with` property of the source code checkout step.
// Default: - not set.
//
// Experimental.
CheckoutWith *CheckoutWith `field:"optional" json:"checkoutWith" yaml:"checkoutWith"`
// Adds an 'if' condition to the workflow.
// Experimental.
Condition *string `field:"optional" json:"condition" yaml:"condition"`
// Default: - default image.
//
// Experimental.
Container *workflows.ContainerOptions `field:"optional" json:"container" yaml:"container"`
// Whether to download files from Git LFS for this workflow.
// Default: - Use the setting on the corresponding GitHub project.
//
// Experimental.
DownloadLfs *bool `field:"optional" json:"downloadLfs" yaml:"downloadLfs"`
// Workflow environment variables.
// Default: {}.
//
// Experimental.
Env *map[string]*string `field:"optional" json:"env" yaml:"env"`
// The git identity to use in this workflow.
// Experimental.
GitIdentity *GitIdentity `field:"optional" json:"gitIdentity" yaml:"gitIdentity"`
// Default settings for all steps in the TaskWorkflow Job.
// Experimental.
JobDefaults *workflows.JobDefaults `field:"optional" json:"jobDefaults" yaml:"jobDefaults"`
// Mapping of job output names to values/expressions.
// Default: {}.
//
// Experimental.
Outputs *map[string]*workflows.JobStepOutput `field:"optional" json:"outputs" yaml:"outputs"`
// Actions to run after the main build step.
// Default: - not set.
//
// Experimental.
PostBuildSteps *[]*workflows.JobStep `field:"optional" json:"postBuildSteps" yaml:"postBuildSteps"`
// Steps to run before the main build step.
// Default: - not set.
//
// Experimental.
PreBuildSteps *[]*workflows.JobStep `field:"optional" json:"preBuildSteps" yaml:"preBuildSteps"`
// Initial steps to run before the source code checkout.
// Default: - not set.
//
// Experimental.
PreCheckoutSteps *[]*workflows.JobStep `field:"optional" json:"preCheckoutSteps" yaml:"preCheckoutSteps"`
// Github Runner selection labels.
// Default: ["ubuntu-latest"].
//
// Experimental.
RunsOn *[]*string `field:"optional" json:"runsOn" yaml:"runsOn"`
// Github Runner Group selection options.
// Experimental.
RunsOnGroup *projen.GroupRunnerOptions `field:"optional" json:"runsOnGroup" yaml:"runsOnGroup"`
}
Options to create the Job associated with a TaskWorkflow. Experimental.
type TaskWorkflowOptions ¶
type TaskWorkflowOptions struct {
// Permissions for the build job.
// Experimental.
Permissions *workflows.JobPermissions `field:"required" json:"permissions" yaml:"permissions"`
// A directory name which contains artifacts to be uploaded (e.g. `dist`). If this is set, the contents of this directory will be uploaded as an artifact at the end of the workflow run, even if other steps fail.
// Default: - not set.
//
// Experimental.
ArtifactsDirectory *string `field:"optional" json:"artifactsDirectory" yaml:"artifactsDirectory"`
// Override for the `with` property of the source code checkout step.
// Default: - not set.
//
// Experimental.
CheckoutWith *CheckoutWith `field:"optional" json:"checkoutWith" yaml:"checkoutWith"`
// Adds an 'if' condition to the workflow.
// Experimental.
Condition *string `field:"optional" json:"condition" yaml:"condition"`
// Default: - default image.
//
// Experimental.
Container *workflows.ContainerOptions `field:"optional" json:"container" yaml:"container"`
// Whether to download files from Git LFS for this workflow.
// Default: - Use the setting on the corresponding GitHub project.
//
// Experimental.
DownloadLfs *bool `field:"optional" json:"downloadLfs" yaml:"downloadLfs"`
// Workflow environment variables.
// Default: {}.
//
// Experimental.
Env *map[string]*string `field:"optional" json:"env" yaml:"env"`
// The git identity to use in this workflow.
// Experimental.
GitIdentity *GitIdentity `field:"optional" json:"gitIdentity" yaml:"gitIdentity"`
// Default settings for all steps in the TaskWorkflow Job.
// Experimental.
JobDefaults *workflows.JobDefaults `field:"optional" json:"jobDefaults" yaml:"jobDefaults"`
// Mapping of job output names to values/expressions.
// Default: {}.
//
// Experimental.
Outputs *map[string]*workflows.JobStepOutput `field:"optional" json:"outputs" yaml:"outputs"`
// Actions to run after the main build step.
// Default: - not set.
//
// Experimental.
PostBuildSteps *[]*workflows.JobStep `field:"optional" json:"postBuildSteps" yaml:"postBuildSteps"`
// Steps to run before the main build step.
// Default: - not set.
//
// Experimental.
PreBuildSteps *[]*workflows.JobStep `field:"optional" json:"preBuildSteps" yaml:"preBuildSteps"`
// Initial steps to run before the source code checkout.
// Default: - not set.
//
// Experimental.
PreCheckoutSteps *[]*workflows.JobStep `field:"optional" json:"preCheckoutSteps" yaml:"preCheckoutSteps"`
// Github Runner selection labels.
// Default: ["ubuntu-latest"].
//
// Experimental.
RunsOn *[]*string `field:"optional" json:"runsOn" yaml:"runsOn"`
// Github Runner Group selection options.
// Experimental.
RunsOnGroup *projen.GroupRunnerOptions `field:"optional" json:"runsOnGroup" yaml:"runsOnGroup"`
// The workflow name.
// Experimental.
Name *string `field:"required" json:"name" yaml:"name"`
// The main task to be executed.
// Experimental.
Task projen.Task `field:"required" json:"task" yaml:"task"`
// The primary job id.
// Default: "build".
//
// Experimental.
JobId *string `field:"optional" json:"jobId" yaml:"jobId"`
// The triggers for the workflow.
// Default: - by default workflows can only be triggered by manually.
//
// Experimental.
Triggers *workflows.Triggers `field:"optional" json:"triggers" yaml:"triggers"`
}
Options to create a TaskWorkflow. Experimental.
type UploadArtifactOptions ¶ added in v0.78.10
type UploadArtifactOptions struct {
// Sets environment variables for steps to use in the runner environment.
//
// You can also set environment variables for the entire workflow or a job.
// Experimental.
Env *map[string]*string `field:"optional" json:"env" yaml:"env"`
// A unique identifier for the step.
//
// You can use the id to reference the
// step in contexts.
// Experimental.
Id *string `field:"optional" json:"id" yaml:"id"`
// You can use the if conditional to prevent a job from running unless a condition is met.
//
// You can use any supported context and expression to
// create a conditional.
// Experimental.
If *string `field:"optional" json:"if" yaml:"if"`
// A name for your step to display on GitHub.
// Experimental.
Name *string `field:"optional" json:"name" yaml:"name"`
// Specifies a working directory for a step.
//
// Overrides a job's working directory.
// Experimental.
WorkingDirectory *string `field:"optional" json:"workingDirectory" yaml:"workingDirectory"`
// Prevents a job from failing when a step fails.
//
// Set to true to allow a job
// to pass when this step fails.
// Experimental.
ContinueOnError *bool `field:"optional" json:"continueOnError" yaml:"continueOnError"`
// The maximum number of minutes to run the step before killing the process.
// Experimental.
TimeoutMinutes *float64 `field:"optional" json:"timeoutMinutes" yaml:"timeoutMinutes"`
// Options for `upload-artifact`.
// Experimental.
With *UploadArtifactWith `field:"required" json:"with" yaml:"with"`
}
Experimental.
type UploadArtifactWith ¶ added in v0.78.10
type UploadArtifactWith struct {
// A file, directory or wildcard pattern that describes what to upload.
// Experimental.
Path *string `field:"required" json:"path" yaml:"path"`
// The level of compression for Zlib to be applied to the artifact archive.
//
// The value can range from 0 to 9.
// For large files that are not easily compressed, a value of 0 is recommended for significantly faster uploads.
// Default: 6.
//
// Experimental.
CompressionLevel *float64 `field:"optional" json:"compressionLevel" yaml:"compressionLevel"`
// The desired behavior if no files are found using the provided path.
//
// Available Options:
// warn: Output a warning but do not fail the action
// error: Fail the action with an error message
// ignore: Do not output any warnings or errors, the action does not fail.
// Default: "warn".
//
// Experimental.
IfNoFilesFound *string `field:"optional" json:"ifNoFilesFound" yaml:"ifNoFilesFound"`
// Whether to include hidden files in the provided path in the artifact.
//
// The file contents of any hidden files in the path should be validated before enabled this to avoid uploading sensitive information.
// Default: false.
//
// Experimental.
IncludeHiddenFiles *bool `field:"optional" json:"includeHiddenFiles" yaml:"includeHiddenFiles"`
// Name of the artifact to upload.
// Default: "artifact".
//
// Experimental.
Name *string `field:"optional" json:"name" yaml:"name"`
// Whether action should overwrite an existing artifact with the same name (should one exist).
//
// Introduced in v4 and represents a breaking change from the behavior of the v3 action.
// To maintain backwards compatibility with existing, this should be set the `true` (the default).
// Default: true.
//
// Experimental.
Overwrite *bool `field:"optional" json:"overwrite" yaml:"overwrite"`
// Duration after which artifact will expire in days. 0 means using default repository retention.
//
// Minimum 1 day.
// Maximum 90 days unless changed from the repository settings page.
// Default: - The default repository retention.
//
// Experimental.
RetentionDays *float64 `field:"optional" json:"retentionDays" yaml:"retentionDays"`
}
Experimental.
type UploadGitPatchOptions ¶
type UploadGitPatchOptions struct {
// The name of the output to emit.
//
// It will be set to `true` if there was a diff.
// Experimental.
OutputName *string `field:"required" json:"outputName" yaml:"outputName"`
// The step ID which produces the output which indicates if a patch was created.
// Experimental.
StepId *string `field:"required" json:"stepId" yaml:"stepId"`
// Fail if a mutation was found and print this error message.
// Default: - do not fail upon mutation.
//
// Experimental.
MutationError *string `field:"optional" json:"mutationError" yaml:"mutationError"`
// The name of the artifact the patch is stored as.
// Default: ".repo.patch"
//
// Experimental.
PatchFile *string `field:"optional" json:"patchFile" yaml:"patchFile"`
// The name of the step.
// Default: "Find mutations".
//
// Experimental.
StepName *string `field:"optional" json:"stepName" yaml:"stepName"`
}
Options for `uploadGitPatch`. Experimental.
type VersioningStrategy ¶
type VersioningStrategy string
The strategy to use when edits manifest and lock files. Experimental.
const ( // Only create pull requests to update lockfiles updates. // // Ignore any new // versions that would require package manifest changes. // Experimental. VersioningStrategy_LOCKFILE_ONLY VersioningStrategy = "LOCKFILE_ONLY" // - For apps, the version requirements are increased. // // - For libraries, the range of versions is widened. // Experimental. VersioningStrategy_AUTO VersioningStrategy = "AUTO" // Relax the version requirement to include both the new and old version, when possible. // Experimental. VersioningStrategy_WIDEN VersioningStrategy = "WIDEN" // Always increase the version requirement to match the new version. // Experimental. VersioningStrategy_INCREASE VersioningStrategy = "INCREASE" // Increase the version requirement only when required by the new version. // Experimental. VersioningStrategy_INCREASE_IF_NECESSARY VersioningStrategy = "INCREASE_IF_NECESSARY" )
type WorkflowActions ¶
type WorkflowActions interface {
}
A set of utility functions for creating GitHub actions in workflows. Experimental.
type WorkflowJobs ¶
type WorkflowJobs interface {
}
A set of utility functions for creating jobs in GitHub Workflows. Experimental.
type WorkflowSteps ¶ added in v0.78.3
type WorkflowSteps interface {
}
A collection of very commonly used, individual, GitHub Workflow Job steps. Experimental.
Source Files
¶
- AutoApprove.go
- AutoApproveOptions.go
- AutoApprove__checks.go
- AutoMerge.go
- AutoMergeOptions.go
- AutoMerge__checks.go
- AutoQueue.go
- AutoQueueOptions.go
- AutoQueue__checks.go
- CheckoutOptions.go
- CheckoutWith.go
- CheckoutWithPatchOptions.go
- ConcurrencyOptions.go
- ContributorStatementOptions.go
- CreatePullRequestOptions.go
- Dependabot.go
- DependabotAllow.go
- DependabotGroup.go
- DependabotIgnore.go
- DependabotOptions.go
- DependabotRegistry.go
- DependabotRegistryType.go
- DependabotScheduleInterval.go
- Dependabot__checks.go
- DownloadArtifactOptions.go
- DownloadArtifactWith.go
- GitHub.go
- GitHubActionsProvider.go
- GitHubActionsProvider__checks.go
- GitHubOptions.go
- GitHubProject.go
- GitHubProjectOptions.go
- GitHubProject__checks.go
- GitHub__checks.go
- GitIdentity.go
- GithubCredentials.go
- GithubCredentialsAppOptions.go
- GithubCredentialsPersonalAccessTokenOptions.go
- GithubCredentials__checks.go
- GithubWorkflow.go
- GithubWorkflowOptions.go
- GithubWorkflow__checks.go
- IAddConditionsLater.go
- MergeMethod.go
- MergeQueue.go
- MergeQueueOptions.go
- MergeQueue__checks.go
- Mergify.go
- MergifyConditionalOperator.go
- MergifyOptions.go
- MergifyQueue.go
- MergifyRule.go
- Mergify__checks.go
- PullRequestBackport.go
- PullRequestBackportOptions.go
- PullRequestBackport__checks.go
- PullRequestFromPatchOptions.go
- PullRequestLint.go
- PullRequestLintOptions.go
- PullRequestLint__checks.go
- PullRequestPatchSource.go
- PullRequestTemplate.go
- PullRequestTemplateOptions.go
- PullRequestTemplate__checks.go
- SemanticTitleOptions.go
- SetupGitIdentityOptions.go
- Stale.go
- StaleBehavior.go
- StaleOptions.go
- Stale__checks.go
- TaskWorkflow.go
- TaskWorkflowJob.go
- TaskWorkflowJobOptions.go
- TaskWorkflowJob__checks.go
- TaskWorkflowOptions.go
- TaskWorkflow__checks.go
- UploadArtifactOptions.go
- UploadArtifactWith.go
- UploadGitPatchOptions.go
- VersioningStrategy.go
- WorkflowActions.go
- WorkflowActions__checks.go
- WorkflowJobs.go
- WorkflowJobs__checks.go
- WorkflowSteps.go
- WorkflowSteps__checks.go
- main.go