Package de.coho04.githubapi.entities
Klasse GHOrganisation
java.lang.Object
de.coho04.githubapi.bases.GHBase
de.coho04.githubapi.bases.ClassBase
de.coho04.githubapi.bases.EntityBase
de.coho04.githubapi.entities.GHOrganisation
- Alle implementierten Schnittstellen:
HttpRequestInterface,JSONHelper
Represents a GitHub organization.
This class provides methods and properties to access information about an organization on GitHub.
-
Verschachtelte Klassen - Übersicht
Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen de.coho04.githubapi.interfaces.JSONHelper
JSONHelper.JSONToObject<T> -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungGHOrganisation(Github github, org.json.JSONObject jsonObject, String name) Constructs a new GHOrganisation instance with the provided GitHub instance, JSON object, and name. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidvoidCreates a hook in the organization.Creates a project in the organization.createProject(String name, String body) Creates a project in the organization.Creates a team in the organization.createTeam(String name) Creates a team in the organization.voiddeleteHook(Long id) Deletes a hook in the organization by its ID.booleandeleteRepositoryFromSecret(String secretName, String repoId) Deletes a repository from a specific secret in the organization by secret name and repository ID.booleandeleteSecret(String name) Deletes a specific secret in the organization by its name.voidEnables organization projects.findRepositoryByName(String name) Finds a repository by its name within the organization.findTeamByName(String name) Finds a team by its name within the organization.findTeamBySlug(String slug) Finds a team by its slug within the organization.Returns the date and time when the organization was archived.Returns the billing email of the organization.getBlog()Returns the blog URL of the organization.intReturns the total active cache usage count for the organization.intReturns the total active cache usage size in bytes for the organization.intReturns the number of collaborators in the organization.Returns the company associated with the organization.Returns the creation date and time of the organization.Returns the default repository permission for the organization.Returns the description of the organization.longReturns the disk usage of the organization.getEmail()Returns the email of the organization.intReturns the number of followers of the organization.intReturns the number of following of the organization.Returns the GitHub instance associated with this organization.Returns the given name of the organization.getHook(int id) Returns a specific hook in the organization by its ID.Returns a specific hook in the organization by its ID.getHooks()Returns a list of hooks in the organization.Returns the URL for fetching hooks of the organization.Returns the URL for fetching issues of the organization.Returns the location of the organization.Returns the allowed repository creation type for members of the organization.Returns the URL for fetching members of the organization.getName()Returns the name of the organization.static GHOrganisationgetOrganisation(Github github, String name) Fetches a GitHub organization by its name.intReturns the number of owned private repositories in the organization.getPackage(String name, GHPackageType packageType) Returns a specific package in the organization by its name and package type.getPlan()Returns the plan associated with the organization.intReturns the number of private gists in the organization.intReturns the number of public gists of the organization.Returns the public key for secrets in the organization.Returns the URL for fetching public members of the organization.intReturns the number of public repositories of the organization.Returns a list of pull requests in the organization.Returns a list of repositories within the organization.Returns a list of repositories with open pull requests in the organization.Returns a specific secret in the organization by its name.Returns the custom link for secret scanning push protection.getTeams()Returns a list of teams within the organization.intReturns the total number of private repositories in the organization.Returns the Twitter username of the organization.Returns the last updated date and time of the organization.getVariable(String name) Returns a specific variable in the organization by its name.Checks if a user is a member of the organization.hasPublicMember(GHUser user) Checks if a user is a public member of the organization.booleanReturns whether advanced security is enabled for new repositories in the organization.booleanReturns whether Dependabot alerts are enabled for new repositories in the organization.booleanReturns whether Dependabot security updates are enabled for new repositories in the organization.booleanReturns whether the dependency graph is enabled for new repositories in the organization.booleanReturns whether the organization has organization projects enabled.booleanReturns whether the organization has repository projects enabled.booleanReturns whether members can create internal repositories in the organization.booleanReturns whether members can create pages in the organization.booleanReturns whether members can create private pages in the organization.booleanReturns whether members can create private repositories in the organization.booleanReturns whether members can create public pages in the organization.booleanReturns whether members can create public repositories in the organization.booleanReturns whether members can create repositories in the organization.booleanReturns whether members can fork private repositories in the organization.voidChecks if organization projects are enabled.booleanReturns whether secret scanning is enabled for new repositories in the organization.booleanReturns whether the custom link for secret scanning push protection is enabled.booleanReturns whether secret scanning push protection is enabled for new repositories in the organization.booleanReturns whether secret scanning validity checks are enabled.booleanReturns whether two-factor authentication is required for members of the organization.booleanReturns whether the organization is verified.booleanReturns whether web commit signoff is required for the organization.Returns a list of Docker conflict packages in the organization.Returns a list of events in the organization.Returns a list of members of the organization.voidlistMembersWithRole(String role) Lists members of the organization with a specific role.Returns a list of outside collaborators of the organization.listPackages(GHPackageType packageType) Returns a list of packages in the organization filtered by package type.Returns a list of projects in the organization.Returns a list of public members of the organization.Returns a list of repository caches in the organization.Returns a list of repositories associated with a specific secret in the organization.Returns a list of secrets in the organization.Returns a list of secret scanning alerts in the organization.Returns a list of teams within the organization.Returns a list of repositories associated with a specific variable in the organization.Returns a list of variables in the organization.voidPublicizes a user's membership in the organization.voidremoveMember(GHUser user) Removes a member from the organization.org.json.JSONObjectConverts this organization instance to a JSONObject.Von Klasse geerbte Methoden de.coho04.githubapi.bases.EntityBase
getAvatarUrl, getLogin, getReposUrl, getType, getUsernameVon Klasse geerbte Methoden de.coho04.githubapi.bases.ClassBase
getEventsUrl, getHtmlUrl, getId, getNodeId, getUrlVon Klasse geerbte Methoden de.coho04.githubapi.bases.GHBase
fetchArrayData, fetchArrayData, fetchPaginatedData, fetchPaginatedData, fetchPaginatedData, getBaseUrlVon Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitVon Schnittstelle geerbte Methoden de.coho04.githubapi.interfaces.HttpRequestInterface
extractNextPageUrl, sendDeleteRequest, sendDeleteRequestWithResponseCode, sendGetRequest, sendGetRequestWithLinkHeader, sendGetRequestWithResponseCode, sendPatchRequest, sendPostRequest, sendPutRequestVon Schnittstelle geerbte Methoden de.coho04.githubapi.interfaces.JSONHelper
getArrayOrNull, getBooleanOrNull, getIntOrNull, getJSONArrayToStringList, getJSONObjectOrNull, getLocalDateOrNull, getLongOrNull, getStringOrNull
-
Konstruktordetails
-
GHOrganisation
Constructs a new GHOrganisation instance with the provided GitHub instance, JSON object, and name.- Parameter:
github- the GitHub instancejsonObject- the JSON object containing the organization dataname- the name of the organization
-
-
Methodendetails
-
getOrganisation
Fetches a GitHub organization by its name.- Parameter:
github- the GitHub instancename- the name of the organization to fetch- Gibt zurück:
- a GHOrganisation instance representing the fetched organization
-
findRepositoryByName
Finds a repository by its name within the organization.- Parameter:
name- the name of the repository to find- Gibt zurück:
- a GHRepository instance representing the found repository
-
getRepositories
Returns a list of repositories within the organization.- Gibt zurück:
- a list of GHRepository instances
-
getName
Returns the name of the organization.- Gibt zurück:
- the name of the organization
-
getDescription
Returns the description of the organization.- Gibt zurück:
- the description of the organization
-
getGithub
Returns the GitHub instance associated with this organization.- Gibt zurück:
- the GitHub instance
-
getCompany
Returns the company associated with the organization.- Gibt zurück:
- the company associated with the organization
-
getHooksUrl
Returns the URL for fetching hooks of the organization.- Gibt zurück:
- the hooks URL
-
getIssuesUrl
Returns the URL for fetching issues of the organization.- Gibt zurück:
- the issues URL
-
getMembersUrl
Returns the URL for fetching members of the organization.- Gibt zurück:
- the members URL
-
getPublicMembersUrl
Returns the URL for fetching public members of the organization.- Gibt zurück:
- the public members URL
-
getFollowers
public int getFollowers()Returns the number of followers of the organization.- Gibt zurück:
- the number of followers
-
getBlog
Returns the blog URL of the organization.- Gibt zurück:
- the blog URL
-
getFollowing
public int getFollowing()Returns the number of following of the organization.- Gibt zurück:
- the number of following
-
getPublicGists
public int getPublicGists()Returns the number of public gists of the organization.- Gibt zurück:
- the number of public gists
-
getPublicRepos
public int getPublicRepos()Returns the number of public repositories of the organization.- Gibt zurück:
- the number of public repositories
-
getEmail
Returns the email of the organization.- Gibt zurück:
- the email of the organization
-
getArchivedAt
Returns the date and time when the organization was archived.- Gibt zurück:
- the archived date and time
-
getLocation
Returns the location of the organization.- Gibt zurück:
- the location of the organization
-
getCreatedAt
Returns the creation date and time of the organization.- Gibt zurück:
- the creation date and time
-
getTwitterUsername
Returns the Twitter username of the organization.- Gibt zurück:
- the Twitter username
-
getUpdatedAt
Returns the last updated date and time of the organization.- Gibt zurück:
- the last updated date and time
-
isHasOrganizationProjects
public boolean isHasOrganizationProjects()Returns whether the organization has organization projects enabled.- Gibt zurück:
- true if organization projects are enabled, false otherwise
-
isHasRepositoryProjects
public boolean isHasRepositoryProjects()Returns whether the organization has repository projects enabled.- Gibt zurück:
- true if repository projects are enabled, false otherwise
-
isVerified
public boolean isVerified()Returns whether the organization is verified.- Gibt zurück:
- true if the organization is verified, false otherwise
-
getPlan
Returns the plan associated with the organization.- Gibt zurück:
- the plan associated with the organization
-
getCollaborators
public int getCollaborators()Returns the number of collaborators in the organization.- Gibt zurück:
- the number of collaborators
-
getOwnedPrivateRepos
public int getOwnedPrivateRepos()Returns the number of owned private repositories in the organization.- Gibt zurück:
- the number of owned private repositories
-
getPrivateGists
public int getPrivateGists()Returns the number of private gists in the organization.- Gibt zurück:
- the number of private gists
-
getTotalPrivateRepos
public int getTotalPrivateRepos()Returns the total number of private repositories in the organization.- Gibt zurück:
- the total number of private repositories
-
getDiskUsage
public long getDiskUsage()Returns the disk usage of the organization.- Gibt zurück:
- the disk usage
-
getBillingEmail
Returns the billing email of the organization.- Gibt zurück:
- the billing email
-
getDefaultRepositoryPermission
Returns the default repository permission for the organization.- Gibt zurück:
- the default repository permission
-
getMembersAllowedRepositoryCreationType
Returns the allowed repository creation type for members of the organization.- Gibt zurück:
- the allowed repository creation type for members
-
getSecretScanningPushProtectionCustomLink
Returns the custom link for secret scanning push protection.- Gibt zurück:
- the custom link for secret scanning push protection
-
isAdvancedSecurityEnabledForNewRepositories
public boolean isAdvancedSecurityEnabledForNewRepositories()Returns whether advanced security is enabled for new repositories in the organization.- Gibt zurück:
- true if advanced security is enabled for new repositories, false otherwise
-
isDependabotAlertsEnabledForNewRepositories
public boolean isDependabotAlertsEnabledForNewRepositories()Returns whether Dependabot alerts are enabled for new repositories in the organization.- Gibt zurück:
- true if Dependabot alerts are enabled for new repositories, false otherwise
-
isDependabotSecurityUpdatesEnabledForNewRepositories
public boolean isDependabotSecurityUpdatesEnabledForNewRepositories()Returns whether Dependabot security updates are enabled for new repositories in the organization.- Gibt zurück:
- true if Dependabot security updates are enabled for new repositories, false otherwise
-
isDependencyGraphEnabledForNewRepositories
public boolean isDependencyGraphEnabledForNewRepositories()Returns whether the dependency graph is enabled for new repositories in the organization.- Gibt zurück:
- true if the dependency graph is enabled for new repositories, false otherwise
-
isMembersCanCreateInternalRepositories
public boolean isMembersCanCreateInternalRepositories()Returns whether members can create internal repositories in the organization.- Gibt zurück:
- true if members can create internal repositories, false otherwise
-
isMembersCanCreatePages
public boolean isMembersCanCreatePages()Returns whether members can create pages in the organization.- Gibt zurück:
- true if members can create pages, false otherwise
-
isMembersCanCreatePrivatePages
public boolean isMembersCanCreatePrivatePages()Returns whether members can create private pages in the organization.- Gibt zurück:
- true if members can create private pages, false otherwise
-
isMembersCanCreatePrivateRepositories
public boolean isMembersCanCreatePrivateRepositories()Returns whether members can create private repositories in the organization.- Gibt zurück:
- true if members can create private repositories, false otherwise
-
isMembersCanCreatePublicPages
public boolean isMembersCanCreatePublicPages()Returns whether members can create public pages in the organization.- Gibt zurück:
- true if members can create public pages, false otherwise
-
isMembersCanCreatePublicRepositories
public boolean isMembersCanCreatePublicRepositories()Returns whether members can create public repositories in the organization.- Gibt zurück:
- true if members can create public repositories, false otherwise
-
isMembersCanCreateRepositories
public boolean isMembersCanCreateRepositories()Returns whether members can create repositories in the organization.- Gibt zurück:
- true if members can create repositories, false otherwise
-
isMembersCanForkPrivateRepositories
public boolean isMembersCanForkPrivateRepositories()Returns whether members can fork private repositories in the organization.- Gibt zurück:
- true if members can fork private repositories, false otherwise
-
isSecretScanningEnabledForNewRepositories
public boolean isSecretScanningEnabledForNewRepositories()Returns whether secret scanning is enabled for new repositories in the organization.- Gibt zurück:
- true if secret scanning is enabled for new repositories, false otherwise
-
isSecretScanningPushProtectionCustomLinkEnabled
public boolean isSecretScanningPushProtectionCustomLinkEnabled()Returns whether the custom link for secret scanning push protection is enabled.- Gibt zurück:
- true if the custom link for secret scanning push protection is enabled, false otherwise
-
isSecretScanningPushProtectionEnabledForNewRepositories
public boolean isSecretScanningPushProtectionEnabledForNewRepositories()Returns whether secret scanning push protection is enabled for new repositories in the organization.- Gibt zurück:
- true if secret scanning push protection is enabled for new repositories, false otherwise
-
isSecretScanningValidityChecksEnabled
public boolean isSecretScanningValidityChecksEnabled()Returns whether secret scanning validity checks are enabled.- Gibt zurück:
- true if secret scanning validity checks are enabled, false otherwise
-
isTwoFactorRequirementEnabled
public boolean isTwoFactorRequirementEnabled()Returns whether two-factor authentication is required for members of the organization.- Gibt zurück:
- true if two-factor authentication is required, false otherwise
-
isWebCommitSignoffRequired
public boolean isWebCommitSignoffRequired()Returns whether web commit signoff is required for the organization.- Gibt zurück:
- true if web commit signoff is required, false otherwise
-
getGivenName
Returns the given name of the organization.- Gibt zurück:
- the given name of the organization
-
toJSONObject
public org.json.JSONObject toJSONObject()Converts this organization instance to a JSONObject.- Setzt außer Kraft:
toJSONObjectin KlasseEntityBase- Gibt zurück:
- a JSONObject representation of this organization
-
getTeams
Returns a list of teams within the organization.- Gibt zurück:
- a list of GHTeam instances
-
listTeams
Returns a list of teams within the organization.- Gibt zurück:
- a list of GHTeam instances
-
findTeamByName
Finds a team by its name within the organization.- Parameter:
name- the name of the team to find- Gibt zurück:
- a GHTeam instance representing the found team
-
findTeamBySlug
Finds a team by its slug within the organization.- Parameter:
slug- the slug of the team to find- Gibt zurück:
- a GHTeam instance representing the found team
-
hasMember
Checks if a user is a member of the organization.- Parameter:
user- the user to check- Gibt zurück:
- true if the user is a member, false otherwise
-
addMember
-
removeMember
Removes a member from the organization.- Parameter:
user- the user to remove
-
hasPublicMember
Checks if a user is a public member of the organization.- Parameter:
user- the user to check- Gibt zurück:
- true if the user is a public member, false otherwise
-
publicize
Publicizes a user's membership in the organization.- Parameter:
user- the user to publicize
-
listMembers
Returns a list of members of the organization.- Gibt zurück:
- a list of GHUser instances
-
listPublicMembers
Returns a list of public members of the organization.- Gibt zurück:
- a list of GHUser instances
-
listOutsideCollaborators
Returns a list of outside collaborators of the organization.- Gibt zurück:
- a list of GHUser instances
-
listMembersWithRole
Lists members of the organization with a specific role.- Parameter:
role- the role to filter members by
-
isOrganisationProjectsEnabled
public void isOrganisationProjectsEnabled()Checks if organization projects are enabled. -
enableOrganisationProjects
public void enableOrganisationProjects()Enables organization projects. -
listProjects
Returns a list of projects in the organization.- Gibt zurück:
- a list of GHProject instances
-
createProject
Creates a project in the organization. -
createProject
Creates a project in the organization. -
createTeam
Creates a team in the organization.- Parameter:
name- the name of the team to create
-
createTeam
Creates a team in the organization.- Gibt zurück:
- a TeamBuilder instance to build the team
-
getRepositorysWithOpenPullRequests
Returns a list of repositories with open pull requests in the organization.- Gibt zurück:
- a list of GHRepository instances
-
getPullRequests
Returns a list of pull requests in the organization.- Gibt zurück:
- a list of GHRepository instances
-
listEvents
Returns a list of events in the organization.- Gibt zurück:
- a list of GHEvent instances
-
getHooks
Returns a list of hooks in the organization.- Gibt zurück:
- a list of GHHook instances
-
getHook
Returns a specific hook in the organization by its ID.- Parameter:
id- the ID of the hook to fetch- Gibt zurück:
- a GHHook instance representing the fetched hook
-
getHook
Returns a specific hook in the organization by its ID.- Parameter:
id- the ID of the hook to fetch- Gibt zurück:
- a GHHook instance representing the fetched hook
-
createHook
public void createHook()Creates a hook in the organization. -
deleteHook
Deletes a hook in the organization by its ID.- Parameter:
id- the ID of the hook to delete
-
listDockerConflictsPackages
Returns a list of Docker conflict packages in the organization.- Gibt zurück:
- a list of GHPackage instances
-
listPackages
Returns a list of packages in the organization filtered by package type.- Parameter:
packageType- the type of packages to list- Gibt zurück:
- a list of GHPackage instances
-
getPackage
Returns a specific package in the organization by its name and package type.- Parameter:
name- the name of the packagepackageType- the type of the package- Gibt zurück:
- a GHPackage instance representing the fetched package
-
listSecretScanningAlerts
Returns a list of secret scanning alerts in the organization.- Gibt zurück:
- a list of GHAlert instances
-
getCacheUsageActiveCount
public int getCacheUsageActiveCount()Returns the total active cache usage count for the organization.- Gibt zurück:
- the total active cache usage count
-
getCacheUsageSizeInBytes
public int getCacheUsageSizeInBytes()Returns the total active cache usage size in bytes for the organization.- Gibt zurück:
- the total active cache usage size in bytes
-
listRepositoryCaches
Returns a list of repository caches in the organization.- Gibt zurück:
- a list of GHRepositoryCache instances
-
listSecrets
Returns a list of secrets in the organization.- Gibt zurück:
- a list of GHSecret instances
-
getPublicKey
Returns the public key for secrets in the organization.- Gibt zurück:
- a GHPublicKey instance representing the public key
-
getSecret
Returns a specific secret in the organization by its name.- Parameter:
name- the name of the secret to fetch- Gibt zurück:
- a GHSecret instance representing the fetched secret
-
deleteSecret
Deletes a specific secret in the organization by its name.- Parameter:
name- the name of the secret to delete- Gibt zurück:
- true if the secret was deleted successfully, false otherwise
-
listSecretRepositorys
Returns a list of repositories associated with a specific secret in the organization.- Gibt zurück:
- a list of GHRepository instances
-
deleteRepositoryFromSecret
Deletes a repository from a specific secret in the organization by secret name and repository ID.- Parameter:
secretName- the name of the secretrepoId- the ID of the repository- Gibt zurück:
- true if the repository was deleted successfully, false otherwise
-
listVariables
Returns a list of variables in the organization.- Gibt zurück:
- a list of GHVariable instances
-
getVariable
Returns a specific variable in the organization by its name.- Parameter:
name- the name of the variable to fetch- Gibt zurück:
- a GHVariable instance representing the fetched variable
-
listVariableRepositorys
Returns a list of repositories associated with a specific variable in the organization.- Parameter:
name- the name of the variable- Gibt zurück:
- a list of GHRepository instances
-