idx
int64
0
241k
question
stringlengths
64
6.21k
target
stringlengths
5
803
5,400
protected function boot ( ) { $ this -> checkRequirements ( ) ; $ this -> yell ( " * We have configured your new Drupal VM to use PHP 7.2. If you would like to change this, edit box/config.yml." ) ; $ confirm = $ this -> confirm ( "Do you want to boot Drupal VM?" , TRUE ) ; if ( $ confirm ) { $ this -> say ( "In the fu...
Boots a Drupal VM .
5,401
protected function isDrupalVmRequired ( ) { $ composer_json = json_decode ( file_get_contents ( $ this -> getConfigValue ( 'repo.root' ) . '/composer.json' ) , TRUE ) ; return ! empty ( $ composer_json [ 'require-dev' ] [ 'geerlingguy/drupal-vm' ] ) && $ composer_json [ 'require-dev' ] [ 'geerlingguy/drupal-vm' ] == $ ...
Determines if Drupal VM is currently in composer . json s require - dev .
5,402
protected function checkRequirements ( ) { if ( ! $ this -> getInspector ( ) -> commandExists ( "vagrant" ) ) { $ this -> logger -> error ( "Vagrant is not installed." ) ; $ this -> say ( "Please install all dependencies for Drupal VM by following the Quickstart Guide:" ) ; $ this -> say ( "https://github.com/geerlingg...
Checks local system for Drupal VM requirements .
5,403
protected function setBaseBox ( $ config ) { $ base_box = $ this -> askChoice ( "Which base box would you like to use?" , [ 'geerlingguy/drupal-vm' , 'geerlingguy/ubuntu1604' , ] , 0 ) ; switch ( $ base_box ) { case 'geerlingguy/ubuntu1604' : case 'geerlingguy/drupal-vm' : $ config -> set ( 'workspace' , '/root' ) ; $ ...
Sets the Drupal VM base box .
5,404
protected function customizeConfigFiles ( ) { $ config = clone $ this -> getConfig ( ) ; $ config -> set ( 'drupalvm.config.dir' , $ this -> vmConfigDir ) ; $ config -> expandFileProperties ( $ this -> projectDrupalVmVagrantfile ) ; $ random_local_ip = "192.168." . rand ( 3 , 254 ) . '.' . rand ( 3 , 254 ) ; $ config -...
Modifies the default configuration file .
5,405
protected function createConfigFiles ( ) { $ this -> logger -> info ( "Creating configuration files for Drupal VM..." ) ; $ this -> taskFilesystemStack ( ) -> mkdir ( $ this -> vmDir ) -> copy ( $ this -> defaultDrupalVmConfigFile , $ this -> projectDrupalVmConfigFile , TRUE ) -> copy ( $ this -> defaultDrupalVmVagrant...
Creates the default configuration file .
5,406
protected function createDrushAlias ( ) { $ this -> logger -> info ( "Adding a drush alias for the new VM..." ) ; if ( ! file_exists ( $ this -> projectDrushAliasesFile ) ) { $ new_aliases = Expander :: parse ( file_get_contents ( $ this -> defaultDrupalVmDrushAliasesFile ) , $ this -> getConfig ( ) -> export ( ) ) ; }...
Creates a new drush alias record .
5,407
protected function initializeBlt ( ) { $ this -> updateRootProjectFiles ( ) ; $ this -> taskExecStack ( ) -> dir ( $ this -> getConfigValue ( "repo.root" ) ) -> exec ( "composer drupal:scaffold" ) -> setVerbosityThreshold ( VerbosityThresholdInterface :: VERBOSITY_VERBOSE ) -> run ( ) ; $ config_initializer = new Confi...
Creates initial BLT files in their default state .
5,408
public function update ( $ options = [ 'since' => InputOption :: VALUE_REQUIRED ] ) { $ this -> rsyncTemplate ( ) ; $ starting_version = $ options [ 'since' ] ? : $ this -> currentSchemaVersion ; if ( $ this -> executeSchemaUpdates ( $ starting_version ) ) { $ this -> updateSchemaVersionFile ( ) ; } $ this -> cleanup (...
Updates files from BLT s template and executes scripted updates .
5,409
public function cleanup ( ) { $ this -> say ( "Removing deprecated files and directories..." ) ; $ this -> taskFilesystemStack ( ) -> remove ( [ "build" , "docroot/sites/default/settings/apcu_fix.yml" , "docroot/sites/default/settings/base.settings.php" , "docroot/sites/default/settings/blt.settings.php" , "docroot/sit...
Removes deprecated BLT files and directories .
5,410
protected function executeSchemaUpdates ( $ starting_version ) { $ starting_version = $ this -> convertLegacySchemaVersion ( $ starting_version ) ; $ updater = new Updater ( 'Acquia\Blt\Update\Updates' , $ this -> getConfigValue ( 'repo.root' ) ) ; $ updates = $ updater -> getUpdates ( $ starting_version ) ; if ( $ upd...
Executes all update hooks for a given schema delta .
5,411
protected function convertLegacySchemaVersion ( $ version ) { if ( strpos ( $ version , '.' ) !== FALSE ) { str_replace ( '-beta1' , '' , $ version ) ; $ semver_array = explode ( '.' , $ version ) ; $ semver_array [ 1 ] = str_pad ( $ semver_array [ 1 ] , 3 , "0" , STR_PAD_LEFT ) ; $ semver_array [ 2 ] = str_pad ( $ sem...
Converts legacy BLT schema version to current version .
5,412
protected function rsyncTemplate ( ) { $ source = $ this -> getConfigValue ( 'blt.root' ) . '/template' ; $ destination = $ this -> getConfigValue ( 'repo.root' ) ; if ( DIRECTORY_SEPARATOR === '\\' ) { $ source = $ this -> convertWindowsPathToCygwinPath ( $ source ) ; $ destination = $ this -> convertWindowsPathToCygw...
Rsyncs files from BLT s template dir into project root dir .
5,413
protected function mungeProjectYml ( ) { $ this -> say ( "Merging BLT's <comment>blt.yml</comment> template with your project's <comment>blt/blt.yml</comment>..." ) ; $ repo_project_yml = $ this -> getConfigValue ( 'blt.config-files.project' ) ; $ template_project_yml = $ this -> getConfigValue ( 'blt.root' ) . '/templ...
Updates project BLT . yml files with new key value pairs from upstream .
5,414
protected function setProjectName ( ) { $ project_name = basename ( $ this -> getConfigValue ( 'repo.root' ) ) ; $ project_yml = $ this -> getConfigValue ( 'blt.config-files.project' ) ; $ project_config = YamlMunge :: parseFile ( $ project_yml ) ; $ project_config [ 'project' ] [ 'machine_name' ] = $ project_name ; Ya...
Sets project . name using the directory name of repot . root .
5,415
public static function convertComposerJson ( $ composer_json ) { foreach ( $ composer_json [ 'require' ] as $ package_name => $ version_constraint ) { if ( $ package_name == 'drupal/core' ) { continue ; } if ( strstr ( $ package_name , 'drupal/' ) ) { $ composer_json [ 'require' ] [ $ package_name ] = self :: convertVe...
Converts composer . json from packagist . drupal - composer . org to D . O format .
5,416
protected static function convertVersionConstraint ( $ version_constraint ) { if ( preg_match ( '/-dev(#[0-9a-f]+)?$/' , $ version_constraint ) ) { return preg_replace ( '/^8\.(x-)?/' , NULL , $ version_constraint ) ; } if ( strpos ( $ version_constraint , 'dev-' ) === 0 ) { return preg_replace ( '/^dev-(8\.(x-)?)?([^#...
Converts from to to packagist . drupal - composer . org to D . O format .
5,417
public function updateAcsfSites ( $ site , $ target_env ) { $ this -> say ( "Running updates for site <comment>$site</comment> in environment <comment>$target_env</comment>." ) ; $ this -> switchSiteContext ( $ site ) ; $ this -> invokeCommand ( 'artifact:update:drupal' ) ; }
Executes updates against all ACSF sites in the target environment .
5,418
public function all ( $ username , $ repository , $ issue ) { return $ this -> get ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/issues/' . rawurlencode ( $ issue ) . '/timeline' ) ; }
Get all events for a specific issue .
5,419
public function repositories ( $ organization , $ type = 'all' , $ page = 1 ) { return $ this -> get ( '/orgs/' . rawurlencode ( $ organization ) . '/repos' , [ 'type' => $ type , 'page' => $ page , ] ) ; }
List all repositories across all the organizations that you can access .
5,420
public function createInstallationToken ( $ installationId , $ userId = null ) { $ parameters = [ ] ; if ( $ userId ) { $ parameters [ 'user_id' ] = $ userId ; } return $ this -> post ( '/app/installations/' . rawurlencode ( $ installationId ) . '/access_tokens' , $ parameters ) ; }
Create an access token for an installation .
5,421
public function listRepositories ( $ userId = null ) { $ parameters = [ ] ; if ( $ userId ) { $ parameters [ 'user_id' ] = $ userId ; } return $ this -> get ( '/installation/repositories' , $ parameters ) ; }
List repositories that are accessible to the authenticated installation .
5,422
public function show ( $ username , $ repository , $ reference ) { $ reference = $ this -> encodeReference ( $ reference ) ; return $ this -> get ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/git/refs/' . $ reference ) ; }
Show the reference of a repository .
5,423
public function update ( $ username , $ repository , $ reference , array $ params ) { if ( ! isset ( $ params [ 'sha' ] ) ) { throw new MissingArgumentException ( 'sha' ) ; } $ reference = $ this -> encodeReference ( $ reference ) ; return $ this -> patch ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode (...
Update a reference for a repository .
5,424
public function remove ( $ username , $ repository , $ reference ) { $ reference = $ this -> encodeReference ( $ reference ) ; return $ this -> delete ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/git/refs/' . $ reference ) ; }
Delete a reference of a repository .
5,425
public function show ( $ username , $ repository , $ sha , $ recursive = false ) { return $ this -> get ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/git/trees/' . rawurlencode ( $ sha ) , $ recursive ? [ 'recursive' => 1 ] : [ ] ) ; }
Get the tree for a repository .
5,426
public function create ( $ username , $ repository , array $ params ) { if ( ! isset ( $ params [ 'tree' ] ) || ! is_array ( $ params [ 'tree' ] ) ) { throw new MissingArgumentException ( 'tree' ) ; } if ( ! isset ( $ params [ 'tree' ] [ 0 ] ) ) { $ params [ 'tree' ] = [ $ params [ 'tree' ] ] ; } foreach ( $ params [ '...
Create tree for a repository .
5,427
public function configure ( $ bodyType = null ) { if ( ! in_array ( $ bodyType , [ 'text' , 'html' , 'full' ] ) ) { $ bodyType = 'raw' ; } $ this -> acceptHeaderValue = sprintf ( 'application/vnd.github.%s.%s+json' , $ this -> client -> getApiVersion ( ) , $ bodyType ) ; return $ this ; }
Configure the body type .
5,428
public function update ( $ gist , $ comment_id , $ body ) { return $ this -> patch ( '/gists/' . rawurlencode ( $ gist ) . '/comments/' . rawurlencode ( $ comment_id ) , [ 'body' => $ body ] ) ; }
Create a comment for a gist .
5,429
public function following ( $ username , array $ parameters = [ ] , array $ requestHeaders = [ ] ) { return $ this -> get ( '/users/' . rawurlencode ( $ username ) . '/following' , $ parameters , $ requestHeaders ) ; }
Request the users that a specific user is following .
5,430
public function followers ( $ username , array $ parameters = [ ] , array $ requestHeaders = [ ] ) { return $ this -> get ( '/users/' . rawurlencode ( $ username ) . '/followers' , $ parameters , $ requestHeaders ) ; }
Request the users following a specific user .
5,431
public function starred ( $ username , $ page = 1 , $ perPage = 30 , $ sort = 'created' , $ direction = 'desc' ) { return $ this -> get ( '/users/' . rawurlencode ( $ username ) . '/starred' , [ 'page' => $ page , 'per_page' => $ perPage , 'sort' => $ sort , 'direction' => $ direction , ] ) ; }
Request starred repositories that a specific user has starred .
5,432
public function status ( $ username , $ repository , $ id ) { $ link = $ this -> show ( $ username , $ repository , $ id ) [ '_links' ] [ 'statuses' ] [ 'href' ] ; return $ this -> get ( $ link ) ; }
All statuses which are the statuses of its head branch .
5,433
public function readme ( $ username , $ repository , $ reference = null ) { return $ this -> get ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/readme' , [ 'ref' => $ reference , ] ) ; }
Get content of README file in a repository .
5,434
public function show ( $ username , $ repository , $ path = null , $ reference = null ) { $ url = '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/contents' ; if ( null !== $ path ) { $ url .= '/' . rawurlencode ( $ path ) ; } return $ this -> get ( $ url , [ 'ref' => $ reference , ] ) ...
Get contents of any file or directory in a repository .
5,435
public function create ( $ username , $ repository , $ path , $ content , $ message , $ branch = null , array $ committer = null ) { $ url = '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/contents/' . rawurlencode ( $ path ) ; $ parameters = [ 'content' => base64_encode ( $ content ) ...
Creates a new file in a repository .
5,436
public function exists ( $ username , $ repository , $ path , $ reference = null ) { $ url = '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/contents' ; if ( null !== $ path ) { $ url .= '/' . rawurlencode ( $ path ) ; } try { $ response = $ this -> head ( $ url , [ 'ref' => $ referenc...
Checks that a given path exists in a repository .
5,437
public function rm ( $ username , $ repository , $ path , $ message , $ sha , $ branch = null , array $ committer = null ) { $ url = '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/contents/' . rawurlencode ( $ path ) ; $ parameters = [ 'message' => $ message , 'sha' => $ sha , ] ; if ...
Deletes a file from a repository .
5,438
public function archive ( $ username , $ repository , $ format , $ reference = null ) { if ( ! in_array ( $ format , [ 'tarball' , 'zipball' ] ) ) { $ format = 'tarball' ; } return $ this -> get ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/' . rawurlencode ( $ format ) . ( ( null ...
Get content of archives in a repository .
5,439
public function download ( $ username , $ repository , $ path , $ reference = null ) { $ file = $ this -> show ( $ username , $ repository , $ path , $ reference ) ; if ( ! isset ( $ file [ 'type' ] ) || ! in_array ( $ file [ 'type' ] , [ 'file' , 'symlink' ] , true ) ) { throw new InvalidArgumentException ( sprintf ( ...
Get the contents of a file in a repository .
5,440
public function find ( $ username , $ repository , $ state , $ keyword ) { if ( ! in_array ( $ state , [ 'open' , 'closed' ] ) ) { $ state = 'open' ; } return $ this -> get ( '/legacy/issues/search/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/' . rawurlencode ( $ state ) . '/' . rawurlencod...
Search issues by username repo state and keyword .
5,441
public function org ( $ organization , $ state , array $ params = [ ] ) { if ( ! in_array ( $ state , [ 'open' , 'closed' ] ) ) { $ state = 'open' ; } return $ this -> get ( '/orgs/' . rawurlencode ( $ organization ) . '/issues' , array_merge ( [ 'page' => 1 , 'state' => $ state ] , $ params ) ) ; }
List issues by organization .
5,442
public function lock ( $ username , $ repository , $ id ) { return $ this -> put ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/issues/' . rawurlencode ( $ id ) . '/lock' ) ; }
Lock an issue . Users with push access can lock an issue s conversation .
5,443
public function unlock ( $ username , $ repository , $ id ) { return $ this -> delete ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/issues/' . rawurlencode ( $ id ) . '/lock' ) ; }
Unlock an issue . Users with push access can unlock an issue s conversation .
5,444
public function getResource ( $ name ) { if ( empty ( $ this -> resources ) ) { $ this -> fetchLimits ( ) ; } if ( ! isset ( $ this -> resources [ $ name ] ) ) { return false ; } return $ this -> resources [ $ name ] ; }
Returns a rate limit resource object by the given name .
5,445
protected function fetchLimits ( ) { $ result = $ this -> get ( '/rate_limit' ) ? : [ ] ; foreach ( $ result [ 'resources' ] as $ resourceName => $ resource ) { $ this -> resources [ $ resourceName ] = new RateLimitResource ( $ resourceName , $ resource ) ; } return $ result ; }
Returns the data directly from the GitHub API endpoint .
5,446
public function updateStatus ( $ username , $ repository , $ id , array $ params ) { if ( ! isset ( $ params [ 'state' ] ) ) { throw new MissingArgumentException ( [ 'state' ] ) ; } return $ this -> post ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/deployments/' . rawurlencode ( $...
Updates a deployment by creating a new status update .
5,447
public function getStatuses ( $ username , $ repository , $ id ) { return $ this -> get ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/deployments/' . rawurlencode ( $ id ) . '/statuses' ) ; }
Gets all of the status updates tied to a given deployment .
5,448
public static function getHeader ( ResponseInterface $ response , $ name ) { $ headers = $ response -> getHeader ( $ name ) ; return array_shift ( $ headers ) ; }
Get the value for a single header .
5,449
public function all ( $ includingRead = false , $ participating = false , DateTime $ since = null , DateTime $ before = null ) { $ parameters = [ 'all' => $ includingRead , 'participating' => $ participating , ] ; if ( $ since !== null ) { $ parameters [ 'since' ] = $ since -> format ( DateTime :: ISO8601 ) ; } if ( $ ...
Get a listing of notifications .
5,450
public function markRead ( DateTime $ since = null ) { $ parameters = [ ] ; if ( $ since !== null ) { $ parameters [ 'last_read_at' ] = $ since -> format ( DateTime :: ISO8601 ) ; } $ this -> put ( '/notifications' , $ parameters ) ; }
Marks all notifications as read from the current date .
5,451
public function listAvailable ( $ username , $ repository , array $ parameters = [ ] ) { return $ this -> get ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/assignees' , $ parameters ) ; }
List all the available assignees to which issues may be assigned .
5,452
public function check ( $ username , $ repository , $ assignee ) { return $ this -> get ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/assignees/' . rawurlencode ( $ assignee ) ) ; }
Check to see if a particular user is an assignee for a repository .
5,453
public function add ( $ username , $ repository , $ issue , array $ parameters ) { if ( ! isset ( $ parameters [ 'assignees' ] ) ) { throw new MissingArgumentException ( 'assignees' ) ; } if ( ! is_array ( $ parameters [ 'assignees' ] ) ) { @ trigger_error ( sprintf ( 'Passing the "assignees" parameter as a string in "...
Add assignees to an Issue .
5,454
public function remove ( $ username , $ repository , $ issue , array $ parameters ) { if ( ! isset ( $ parameters [ 'assignees' ] ) ) { throw new MissingArgumentException ( 'assignees' ) ; } return $ this -> delete ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/issues/' . rawurlenco...
Remove assignees from an Issue .
5,455
public function show ( $ username , $ repository , $ event ) { return $ this -> get ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/issues/events/' . rawurlencode ( $ event ) ) ; }
Display an event for an issue .
5,456
public function show ( $ username , $ repository , $ sha ) { $ response = $ this -> get ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/git/blobs/' . rawurlencode ( $ sha ) ) ; return $ response ; }
Show a blob of a sha for a repository .
5,457
public function all ( $ username , $ repository , $ pullRequest = null , array $ params = [ ] ) { if ( null !== $ pullRequest ) { return $ this -> get ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/pulls/' . rawurlencode ( $ pullRequest ) . '/comments' ) ; } $ parameters = array_mer...
Get a listing of a pull request s comments by the username repository and pull request number or all repository comments by the username and repository .
5,458
public function remove ( $ username , $ repository , $ comment ) { return $ this -> delete ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/pulls/comments/' . rawurlencode ( $ comment ) ) ; }
Delete a pull request comment by the username repository and comment id .
5,459
public function update ( $ username , $ repository , array $ values ) { return $ this -> patch ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) , $ values ) ; }
Set information of a repository .
5,460
public function readme ( $ username , $ repository , $ format = 'raw' ) { return $ this -> get ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/readme' , [ ] , [ 'Accept' => "application/vnd.github.$format" , ] ) ; }
Get the readme content for a repository by its username and repository name .
5,461
public function contributors ( $ username , $ repository , $ includingAnonymous = false ) { return $ this -> get ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/contributors' , [ 'anon' => $ includingAnonymous ? : null , ] ) ; }
Get the contributors of a repository .
5,462
public function tags ( $ username , $ repository , array $ params = [ ] ) { return $ this -> get ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/tags' , $ params ) ; }
Get the tags of a repository .
5,463
public function codeOfConduct ( $ username , $ repository ) { $ this -> acceptHeaderValue = 'application/vnd.github.scarlet-witch-preview+json' ; return $ this -> get ( '/repos/' . rawurldecode ( $ username ) . '/' . rawurldecode ( $ repository ) . '/community/code_of_conduct' ) ; }
Get the contents of a repository s code of conduct .
5,464
public function topics ( $ username , $ repository ) { $ this -> acceptHeaderValue = 'application/vnd.github.mercy-preview+json' ; return $ this -> get ( '/repos/' . rawurldecode ( $ username ) . '/' . rawurldecode ( $ repository ) . '/topics' ) ; }
List all topics for a repository .
5,465
public function replaceTopics ( $ username , $ repository , array $ topics ) { $ this -> acceptHeaderValue = 'application/vnd.github.mercy-preview+json' ; return $ this -> put ( '/repos/' . rawurldecode ( $ username ) . '/' . rawurldecode ( $ repository ) . '/topics' , [ 'names' => $ topics ] ) ; }
Replace all topics for a repository .
5,466
public function transfer ( $ username , $ repository , $ newOwner , $ teamId = [ ] ) { $ this -> acceptHeaderValue = 'application/vnd.github.nightshade-preview+json' ; return $ this -> post ( '/repos/' . rawurldecode ( $ username ) . '/' . rawurldecode ( $ repository ) . '/transfer' , [ 'new_owner' => $ newOwner , 'tea...
Transfer a repository .
5,467
public function all ( $ username , $ repository , array $ params = [ ] ) { if ( isset ( $ params [ 'state' ] ) && ! in_array ( $ params [ 'state' ] , [ 'open' , 'closed' , 'all' ] ) ) { $ params [ 'state' ] = 'open' ; } if ( isset ( $ params [ 'sort' ] ) && ! in_array ( $ params [ 'sort' ] , [ 'due_date' , 'completenes...
Get all milestones for a repository .
5,468
public function create ( $ username , $ repository , array $ params ) { if ( ! isset ( $ params [ 'title' ] ) ) { throw new MissingArgumentException ( 'title' ) ; } if ( isset ( $ params [ 'state' ] ) && ! in_array ( $ params [ 'state' ] , [ 'open' , 'closed' ] ) ) { $ params [ 'state' ] = 'open' ; } return $ this -> p...
Create a milestone for a repository .
5,469
public function update ( $ username , $ repository , $ id , array $ params ) { if ( isset ( $ params [ 'state' ] ) && ! in_array ( $ params [ 'state' ] , [ 'open' , 'closed' ] ) ) { $ params [ 'state' ] = 'open' ; } return $ this -> patch ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) ....
Update a milestone for a repository .
5,470
public function remove ( $ username , $ repository , $ id ) { return $ this -> delete ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/milestones/' . rawurlencode ( $ id ) ) ; }
Delete a milestone for a repository .
5,471
public function labels ( $ username , $ repository , $ id ) { return $ this -> get ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/milestones/' . rawurlencode ( $ id ) . '/labels' ) ; }
Get the labels of a milestone .
5,472
public function show ( $ username , $ repository , $ pullRequest , $ id ) { return $ this -> get ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/pulls/' . $ pullRequest . '/reviews/' . $ id ) ; }
Get a single pull request review by the username repository pull request number and the review id .
5,473
public function comments ( $ username , $ repository , $ pullRequest , $ id ) { return $ this -> get ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/pulls/' . rawurlencode ( $ pullRequest ) . '/reviews/' . rawurlencode ( $ id ) . '/comments' ) ; }
Get comments for a single pull request review .
5,474
public function create ( $ username , $ repository , $ pullRequest , array $ params = [ ] ) { if ( array_key_exists ( 'event' , $ params ) && ! in_array ( $ params [ 'event' ] , [ 'APPROVE' , 'REQUEST_CHANGES' , 'COMMENT' ] , true ) ) { throw new InvalidArgumentException ( sprintf ( '"event" must be one of ["APPROVE", ...
Create a pull request review by the username repository and pull request number .
5,475
public function submit ( $ username , $ repository , $ pullRequest , $ id , array $ params = [ ] ) { if ( ! isset ( $ params [ 'event' ] ) ) { throw new MissingArgumentException ( 'event' ) ; } if ( ! in_array ( $ params [ 'event' ] , [ 'APPROVE' , 'REQUEST_CHANGES' , 'COMMENT' ] , true ) ) { throw new InvalidArgumentE...
Submit a pull request review by the username repository pull request number and the review id .
5,476
public function dismiss ( $ username , $ repository , $ pullRequest , $ id , $ message ) { if ( ! is_string ( $ message ) ) { throw new InvalidArgumentException ( sprintf ( '"message" must be a valid string ("%s" given).' , gettype ( $ message ) ) ) ; } if ( empty ( $ message ) ) { throw new InvalidArgumentException ( ...
Dismiss a pull request review by the username repository pull request number and the review id .
5,477
public function update ( $ username , $ repository , $ pullRequest , $ id , $ body ) { if ( ! is_string ( $ body ) ) { throw new InvalidArgumentException ( sprintf ( '"body" must be a valid string ("%s" given).' , gettype ( $ body ) ) ) ; } if ( empty ( $ body ) ) { throw new InvalidArgumentException ( '"body" is manda...
Update a pull request review by the username repository pull request number and the review id .
5,478
private function setEnterpriseUrl ( $ enterpriseUrl ) { $ builder = $ this -> getHttpClientBuilder ( ) ; $ builder -> removePlugin ( Plugin \ AddHostPlugin :: class ) ; $ builder -> removePlugin ( PathPrepend :: class ) ; $ builder -> addPlugin ( new Plugin \ AddHostPlugin ( UriFactoryDiscovery :: find ( ) -> createUri...
Sets the URL of your GitHub Enterprise instance .
5,479
public function show ( $ username , $ repository , $ branch ) { return $ this -> get ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/branches/' . rawurlencode ( $ branch ) . '/protection' ) ; }
Retrieves configured protection for the provided branch .
5,480
public function update ( $ username , $ repository , $ branch , array $ params = [ ] ) { return $ this -> put ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/branches/' . rawurlencode ( $ branch ) . '/protection' , $ params ) ; }
Updates the repo s branch protection .
5,481
public function remove ( $ username , $ repository , $ branch ) { return $ this -> delete ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/branches/' . rawurlencode ( $ branch ) . '/protection' ) ; }
Remove the repo s branch protection .
5,482
public function showStatusChecks ( $ username , $ repository , $ branch ) { return $ this -> get ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/branches/' . rawurlencode ( $ branch ) . '/protection/required_status_checks' ) ; }
Get required status checks of protected branch .
5,483
public function updateStatusChecks ( $ username , $ repository , $ branch , array $ params = [ ] ) { return $ this -> patch ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/branches/' . rawurlencode ( $ branch ) . '/protection/required_status_checks' , $ params ) ; }
Update required status checks of protected branch .
5,484
public function removeStatusChecks ( $ username , $ repository , $ branch ) { return $ this -> delete ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/branches/' . rawurlencode ( $ branch ) . '/protection/required_status_checks' ) ; }
Remove required status checks of protected branch .
5,485
public function showStatusChecksContexts ( $ username , $ repository , $ branch ) { return $ this -> get ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/branches/' . rawurlencode ( $ branch ) . '/protection/required_status_checks/contexts' ) ; }
List required status checks contexts of protected branch .
5,486
public function replaceStatusChecksContexts ( $ username , $ repository , $ branch , array $ params = [ ] ) { return $ this -> put ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/branches/' . rawurlencode ( $ branch ) . '/protection/required_status_checks/contexts' , $ params ) ; }
Replace required status checks contexts of protected branch .
5,487
public function addStatusChecksContexts ( $ username , $ repository , $ branch , array $ params = [ ] ) { return $ this -> post ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/branches/' . rawurlencode ( $ branch ) . '/protection/required_status_checks/contexts' , $ params ) ; }
Add required status checks contexts of protected branch .
5,488
public function removeStatusChecksContexts ( $ username , $ repository , $ branch , array $ params = [ ] ) { return $ this -> delete ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/branches/' . rawurlencode ( $ branch ) . '/protection/required_status_checks/contexts' , $ params ) ; }
Remove required status checks contexts of protected branch .
5,489
public function showPullRequestReviewEnforcement ( $ username , $ repository , $ branch ) { return $ this -> get ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/branches/' . rawurlencode ( $ branch ) . '/protection/required_pull_request_reviews' ) ; }
Get pull request review enforcement of protected branch .
5,490
public function updatePullRequestReviewEnforcement ( $ username , $ repository , $ branch , array $ params = [ ] ) { return $ this -> patch ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/branches/' . rawurlencode ( $ branch ) . '/protection/required_pull_request_reviews' , $ params ...
Update pull request review enforcement of protected branch .
5,491
public function removePullRequestReviewEnforcement ( $ username , $ repository , $ branch ) { return $ this -> delete ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/branches/' . rawurlencode ( $ branch ) . '/protection/required_pull_request_reviews' ) ; }
Remove pull request review enforcement of protected branch .
5,492
public function showAdminEnforcement ( $ username , $ repository , $ branch ) { return $ this -> get ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/branches/' . rawurlencode ( $ branch ) . '/protection/enforce_admins' ) ; }
Get admin enforcement of protected branch .
5,493
public function addAdminEnforcement ( $ username , $ repository , $ branch ) { return $ this -> post ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/branches/' . rawurlencode ( $ branch ) . '/protection/enforce_admins' ) ; }
Add admin enforcement of protected branch .
5,494
public function removeAdminEnforcement ( $ username , $ repository , $ branch ) { return $ this -> delete ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/branches/' . rawurlencode ( $ branch ) . '/protection/enforce_admins' ) ; }
Remove admin enforcement of protected branch .
5,495
public function showRestrictions ( $ username , $ repository , $ branch ) { return $ this -> get ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/branches/' . rawurlencode ( $ branch ) . '/protection/restrictions' ) ; }
Get restrictions of protected branch .
5,496
public function removeRestrictions ( $ username , $ repository , $ branch ) { return $ this -> delete ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/branches/' . rawurlencode ( $ branch ) . '/protection/restrictions' ) ; }
Remove restrictions of protected branch .
5,497
public function showTeamRestrictions ( $ username , $ repository , $ branch ) { return $ this -> get ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/branches/' . rawurlencode ( $ branch ) . '/protection/restrictions/teams' ) ; }
List team restrictions of protected branch .
5,498
public function replaceTeamRestrictions ( $ username , $ repository , $ branch , array $ params = [ ] ) { return $ this -> put ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/branches/' . rawurlencode ( $ branch ) . '/protection/restrictions/teams' , $ params ) ; }
Replace team restrictions of protected branch .
5,499
public function addTeamRestrictions ( $ username , $ repository , $ branch , array $ params = [ ] ) { return $ this -> post ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/branches/' . rawurlencode ( $ branch ) . '/protection/restrictions/teams' , $ params ) ; }
Add team restrictions of protected branch .