Class GitHub

  • All Implemented Interfaces:
    software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

    @Generated(value="jsii-pacmak/1.96.0 (build 921e240)",
               date="2024-03-28T21:16:43.069Z")
    @Stability(Experimental)
    public class GitHub
    extends Component
    • Constructor Detail

      • GitHub

        protected GitHub​(software.amazon.jsii.JsiiObjectRef objRef)
      • GitHub

        protected GitHub​(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
      • GitHub

        @Stability(Experimental)
        public GitHub​(@NotNull
                      Project project,
                      @Nullable
                      GitHubOptions options)
        Parameters:
        project - This parameter is required.
        options -
      • GitHub

        @Stability(Experimental)
        public GitHub​(@NotNull
                      Project project)
        Parameters:
        project - This parameter is required.
    • Method Detail

      • of

        @Stability(Experimental)
        @Nullable
        public static GitHub of​(@NotNull
                                Project project)
        (experimental) Returns the GitHub component of a project or undefined if the project does not have a GitHub component.

        Parameters:
        project - This parameter is required.
      • addDependabot

        @Stability(Experimental)
        @NotNull
        public Dependabot addDependabot​(@Nullable
                                        DependabotOptions options)
        Parameters:
        options -
      • addDependabot

        @Stability(Experimental)
        @NotNull
        public Dependabot addDependabot()
      • addPullRequestTemplate

        @Stability(Experimental)
        @NotNull
        public PullRequestTemplate addPullRequestTemplate​(@NotNull
                                                          @NotNull String... content)
        Parameters:
        content - This parameter is required.
      • addWorkflow

        @Stability(Experimental)
        @NotNull
        public GithubWorkflow addWorkflow​(@NotNull
                                          String name)
        (experimental) Adds a workflow to the project.

        Parameters:
        name - Name of the workflow. This parameter is required.
        Returns:
        a GithubWorkflow instance
      • tryFindWorkflow

        @Stability(Experimental)
        @Nullable
        public GithubWorkflow tryFindWorkflow​(@NotNull
                                              String name)
        (experimental) Finds a GitHub workflow by name.

        Returns undefined if the workflow cannot be found.

        Parameters:
        name - The name of the GitHub workflow. This parameter is required.
      • getDownloadLfs

        @Stability(Experimental)
        @NotNull
        public Boolean getDownloadLfs()
        (experimental) Whether downloading from LFS is enabled for this GitHub project.
      • getProjenCredentials

        @Stability(Experimental)
        @NotNull
        public GithubCredentials getProjenCredentials()
        (experimental) GitHub API authentication method used by projen workflows.
      • getWorkflows

        @Stability(Experimental)
        @NotNull
        public List<GithubWorkflow> getWorkflows()
        (experimental) All workflows.
      • getWorkflowsEnabled

        @Stability(Experimental)
        @NotNull
        public Boolean getWorkflowsEnabled()
        (experimental) Are workflows enabled?
      • getMergify

        @Stability(Experimental)
        @Nullable
        public Mergify getMergify()
        (experimental) The Mergify configured on this repository.

        This is undefined if Mergify was not enabled when creating the repository.