repo
stringlengths
6
63
path
stringlengths
5
140
func_name
stringlengths
3
151
original_string
stringlengths
84
13k
language
stringclasses
1 value
code
stringlengths
84
13k
code_tokens
list
docstring
stringlengths
3
47.2k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
91
247
partition
stringclasses
1 value
acquia/blt
src/Robo/Commands/Vm/VmCommand.php
VmCommand.boot
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 future, run ...
php
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 future, run ...
[ "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.\"", ")", ";", "$", "co...
Boots a Drupal VM. @throws \Acquia\Blt\Robo\Exceptions\BltException
[ "Boots", "a", "Drupal", "VM", "." ]
8a903c1d930f82f4b9ee657d62d123782dd2ed59
https://github.com/acquia/blt/blob/8a903c1d930f82f4b9ee657d62d123782dd2ed59/src/Robo/Commands/Vm/VmCommand.php#L173-L203
train
acquia/blt
src/Robo/Commands/Vm/VmCommand.php
VmCommand.isDrupalVmRequired
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'] == $this->drupalVmVersionC...
php
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'] == $this->drupalVmVersionC...
[ "protected", "function", "isDrupalVmRequired", "(", ")", "{", "$", "composer_json", "=", "json_decode", "(", "file_get_contents", "(", "$", "this", "->", "getConfigValue", "(", "'repo.root'", ")", ".", "'/composer.json'", ")", ",", "TRUE", ")", ";", "return", ...
Determines if Drupal VM is currently in composer.json's require-dev. @return bool TRUE if it is present already and matches version constraint.
[ "Determines", "if", "Drupal", "VM", "is", "currently", "in", "composer", ".", "json", "s", "require", "-", "dev", "." ]
8a903c1d930f82f4b9ee657d62d123782dd2ed59
https://github.com/acquia/blt/blob/8a903c1d930f82f4b9ee657d62d123782dd2ed59/src/Robo/Commands/Vm/VmCommand.php#L227-L231
train
acquia/blt
src/Robo/Commands/Vm/VmCommand.php
VmCommand.checkRequirements
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/geerlingguy/drupal-vm#q...
php
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/geerlingguy/drupal-vm#q...
[ "protected", "function", "checkRequirements", "(", ")", "{", "if", "(", "!", "$", "this", "->", "getInspector", "(", ")", "->", "commandExists", "(", "\"vagrant\"", ")", ")", "{", "$", "this", "->", "logger", "->", "error", "(", "\"Vagrant is not installed.\...
Checks local system for Drupal VM requirements. Verifies that vagrant and its required plugins are installed. @throws \Acquia\Blt\Robo\Exceptions\BltException
[ "Checks", "local", "system", "for", "Drupal", "VM", "requirements", "." ]
8a903c1d930f82f4b9ee657d62d123782dd2ed59
https://github.com/acquia/blt/blob/8a903c1d930f82f4b9ee657d62d123782dd2ed59/src/Robo/Commands/Vm/VmCommand.php#L239-L249
train
acquia/blt
src/Robo/Commands/Vm/VmCommand.php
VmCommand.setBaseBox
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': ...
php
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': ...
[ "protected", "function", "setBaseBox", "(", "$", "config", ")", "{", "$", "base_box", "=", "$", "this", "->", "askChoice", "(", "\"Which base box would you like to use?\"", ",", "[", "'geerlingguy/drupal-vm'", ",", "'geerlingguy/ubuntu1604'", ",", "]", ",", "0", "...
Sets the Drupal VM base box. @param \Acquia\Blt\Robo\Config\BltConfig $config
[ "Sets", "the", "Drupal", "VM", "base", "box", "." ]
8a903c1d930f82f4b9ee657d62d123782dd2ed59
https://github.com/acquia/blt/blob/8a903c1d930f82f4b9ee657d62d123782dd2ed59/src/Robo/Commands/Vm/VmCommand.php#L268-L299
train
acquia/blt
src/Robo/Commands/Vm/VmCommand.php
VmCommand.customizeConfigFiles
protected function customizeConfigFiles() { /** @var \Acquia\Blt\Robo\Config\BltConfig $config */ $config = clone $this->getConfig(); $config->set('drupalvm.config.dir', $this->vmConfigDir); $config->expandFileProperties($this->projectDrupalVmVagrantfile); // Generate a Random IP address for the n...
php
protected function customizeConfigFiles() { /** @var \Acquia\Blt\Robo\Config\BltConfig $config */ $config = clone $this->getConfig(); $config->set('drupalvm.config.dir', $this->vmConfigDir); $config->expandFileProperties($this->projectDrupalVmVagrantfile); // Generate a Random IP address for the n...
[ "protected", "function", "customizeConfigFiles", "(", ")", "{", "/** @var \\Acquia\\Blt\\Robo\\Config\\BltConfig $config */", "$", "config", "=", "clone", "$", "this", "->", "getConfig", "(", ")", ";", "$", "config", "->", "set", "(", "'drupalvm.config.dir'", ",", "...
Modifies the default configuration file.
[ "Modifies", "the", "default", "configuration", "file", "." ]
8a903c1d930f82f4b9ee657d62d123782dd2ed59
https://github.com/acquia/blt/blob/8a903c1d930f82f4b9ee657d62d123782dd2ed59/src/Robo/Commands/Vm/VmCommand.php#L304-L318
train
acquia/blt
src/Robo/Commands/Vm/VmCommand.php
VmCommand.createConfigFiles
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->defaultDrupalVmVagrantfile, ...
php
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->defaultDrupalVmVagrantfile, ...
[ "protected", "function", "createConfigFiles", "(", ")", "{", "$", "this", "->", "logger", "->", "info", "(", "\"Creating configuration files for Drupal VM...\"", ")", ";", "$", "this", "->", "taskFilesystemStack", "(", ")", "->", "mkdir", "(", "$", "this", "->",...
Creates the default configuration file.
[ "Creates", "the", "default", "configuration", "file", "." ]
8a903c1d930f82f4b9ee657d62d123782dd2ed59
https://github.com/acquia/blt/blob/8a903c1d930f82f4b9ee657d62d123782dd2ed59/src/Robo/Commands/Vm/VmCommand.php#L323-L335
train
acquia/blt
src/Robo/Commands/Vm/VmCommand.php
VmCommand.createDrushAlias
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()); } else { $projec...
php
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()); } else { $projec...
[ "protected", "function", "createDrushAlias", "(", ")", "{", "$", "this", "->", "logger", "->", "info", "(", "\"Adding a drush alias for the new VM...\"", ")", ";", "if", "(", "!", "file_exists", "(", "$", "this", "->", "projectDrushAliasesFile", ")", ")", "{", ...
Creates a new drush alias record.
[ "Creates", "a", "new", "drush", "alias", "record", "." ]
8a903c1d930f82f4b9ee657d62d123782dd2ed59
https://github.com/acquia/blt/blob/8a903c1d930f82f4b9ee657d62d123782dd2ed59/src/Robo/Commands/Vm/VmCommand.php#L340-L352
train
acquia/blt
src/Robo/Commands/Blt/UpdateCommand.php
UpdateCommand.initializeBlt
protected function initializeBlt() { $this->updateRootProjectFiles(); $this->taskExecStack() ->dir($this->getConfigValue("repo.root")) ->exec("composer drupal:scaffold") ->setVerbosityThreshold(VerbosityThresholdInterface::VERBOSITY_VERBOSE) ->run(); // Reinitialize configuration no...
php
protected function initializeBlt() { $this->updateRootProjectFiles(); $this->taskExecStack() ->dir($this->getConfigValue("repo.root")) ->exec("composer drupal:scaffold") ->setVerbosityThreshold(VerbosityThresholdInterface::VERBOSITY_VERBOSE) ->run(); // Reinitialize configuration no...
[ "protected", "function", "initializeBlt", "(", ")", "{", "$", "this", "->", "updateRootProjectFiles", "(", ")", ";", "$", "this", "->", "taskExecStack", "(", ")", "->", "dir", "(", "$", "this", "->", "getConfigValue", "(", "\"repo.root\"", ")", ")", "->", ...
Creates initial BLT files in their default state.
[ "Creates", "initial", "BLT", "files", "in", "their", "default", "state", "." ]
8a903c1d930f82f4b9ee657d62d123782dd2ed59
https://github.com/acquia/blt/blob/8a903c1d930f82f4b9ee657d62d123782dd2ed59/src/Robo/Commands/Blt/UpdateCommand.php#L82-L108
train
acquia/blt
src/Robo/Commands/Blt/UpdateCommand.php
UpdateCommand.update
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(); $this->in...
php
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(); $this->in...
[ "public", "function", "update", "(", "$", "options", "=", "[", "'since'", "=>", "InputOption", "::", "VALUE_REQUIRED", "]", ")", "{", "$", "this", "->", "rsyncTemplate", "(", ")", ";", "$", "starting_version", "=", "$", "options", "[", "'since'", "]", "?...
Updates files from BLT's template and executes scripted updates. @command blt:update @aliases bu update @param array $options @throws BltException
[ "Updates", "files", "from", "BLT", "s", "template", "and", "executes", "scripted", "updates", "." ]
8a903c1d930f82f4b9ee657d62d123782dd2ed59
https://github.com/acquia/blt/blob/8a903c1d930f82f4b9ee657d62d123782dd2ed59/src/Robo/Commands/Blt/UpdateCommand.php#L119-L128
train
acquia/blt
src/Robo/Commands/Blt/UpdateCommand.php
UpdateCommand.cleanup
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.se...
php
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.se...
[ "public", "function", "cleanup", "(", ")", "{", "$", "this", "->", "say", "(", "\"Removing deprecated files and directories...\"", ")", ";", "$", "this", "->", "taskFilesystemStack", "(", ")", "->", "remove", "(", "[", "\"build\"", ",", "\"docroot/sites/default/se...
Removes deprecated BLT files and directories. @command blt:source:cleanup @aliases bsc cleanup
[ "Removes", "deprecated", "BLT", "files", "and", "directories", "." ]
8a903c1d930f82f4b9ee657d62d123782dd2ed59
https://github.com/acquia/blt/blob/8a903c1d930f82f4b9ee657d62d123782dd2ed59/src/Robo/Commands/Blt/UpdateCommand.php#L136-L179
train
acquia/blt
src/Robo/Commands/Blt/UpdateCommand.php
UpdateCommand.executeSchemaUpdates
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 ($updates) { $this-...
php
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 ($updates) { $this-...
[ "protected", "function", "executeSchemaUpdates", "(", "$", "starting_version", ")", "{", "$", "starting_version", "=", "$", "this", "->", "convertLegacySchemaVersion", "(", "$", "starting_version", ")", ";", "$", "updater", "=", "new", "Updater", "(", "'Acquia\\Bl...
Executes all update hooks for a given schema delta. @param $starting_version @return bool TRUE if updates were successfully executed.
[ "Executes", "all", "update", "hooks", "for", "a", "given", "schema", "delta", "." ]
8a903c1d930f82f4b9ee657d62d123782dd2ed59
https://github.com/acquia/blt/blob/8a903c1d930f82f4b9ee657d62d123782dd2ed59/src/Robo/Commands/Blt/UpdateCommand.php#L271-L291
train
acquia/blt
src/Robo/Commands/Blt/UpdateCommand.php
UpdateCommand.convertLegacySchemaVersion
protected function convertLegacySchemaVersion($version) { // Check to see if version is Semver (legacy format). Convert to expected // syntax. Luckily, there are a finite number of known legacy versions. // We check specifically for those. // E.g., 8.6.6 => 8006006. if (strpos($version, '.') !== FAL...
php
protected function convertLegacySchemaVersion($version) { // Check to see if version is Semver (legacy format). Convert to expected // syntax. Luckily, there are a finite number of known legacy versions. // We check specifically for those. // E.g., 8.6.6 => 8006006. if (strpos($version, '.') !== FAL...
[ "protected", "function", "convertLegacySchemaVersion", "(", "$", "version", ")", "{", "// Check to see if version is Semver (legacy format). Convert to expected", "// syntax. Luckily, there are a finite number of known legacy versions.", "// We check specifically for those.", "// E.g., 8.6.6 =...
Converts legacy BLT schema version to current version. @param string $version The legacy version. @return string The version in correct syntax.
[ "Converts", "legacy", "BLT", "schema", "version", "to", "current", "version", "." ]
8a903c1d930f82f4b9ee657d62d123782dd2ed59
https://github.com/acquia/blt/blob/8a903c1d930f82f4b9ee657d62d123782dd2ed59/src/Robo/Commands/Blt/UpdateCommand.php#L302-L318
train
acquia/blt
src/Robo/Commands/Blt/UpdateCommand.php
UpdateCommand.rsyncTemplate
protected function rsyncTemplate() { $source = $this->getConfigValue('blt.root') . '/template'; $destination = $this->getConfigValue('repo.root'); // There is no native rsync on Windows. // The most used one on Windows is https://itefix.net/cwrsync, // which runs with cygwin, so doesn't cope with re...
php
protected function rsyncTemplate() { $source = $this->getConfigValue('blt.root') . '/template'; $destination = $this->getConfigValue('repo.root'); // There is no native rsync on Windows. // The most used one on Windows is https://itefix.net/cwrsync, // which runs with cygwin, so doesn't cope with re...
[ "protected", "function", "rsyncTemplate", "(", ")", "{", "$", "source", "=", "$", "this", "->", "getConfigValue", "(", "'blt.root'", ")", ".", "'/template'", ";", "$", "destination", "=", "$", "this", "->", "getConfigValue", "(", "'repo.root'", ")", ";", "...
Rsyncs files from BLT's template dir into project root dir. @return void @throws BltException
[ "Rsyncs", "files", "from", "BLT", "s", "template", "dir", "into", "project", "root", "dir", "." ]
8a903c1d930f82f4b9ee657d62d123782dd2ed59
https://github.com/acquia/blt/blob/8a903c1d930f82f4b9ee657d62d123782dd2ed59/src/Robo/Commands/Blt/UpdateCommand.php#L327-L348
train
acquia/blt
src/Robo/Commands/Blt/UpdateCommand.php
UpdateCommand.mungeProjectYml
protected function mungeProjectYml() { $this->say("Merging BLT's <comment>blt.yml</comment> template with your project's <comment>blt/blt.yml</comment>..."); // Values in the project's existing blt.yml file will be preserved and // not overridden. $repo_project_yml = $this->getConfigValue('blt.config-fi...
php
protected function mungeProjectYml() { $this->say("Merging BLT's <comment>blt.yml</comment> template with your project's <comment>blt/blt.yml</comment>..."); // Values in the project's existing blt.yml file will be preserved and // not overridden. $repo_project_yml = $this->getConfigValue('blt.config-fi...
[ "protected", "function", "mungeProjectYml", "(", ")", "{", "$", "this", "->", "say", "(", "\"Merging BLT's <comment>blt.yml</comment> template with your project's <comment>blt/blt.yml</comment>...\"", ")", ";", "// Values in the project's existing blt.yml file will be preserved and", "...
Updates project BLT .yml files with new key value pairs from upstream. This WILL NOT overwrite existing values.
[ "Updates", "project", "BLT", ".", "yml", "files", "with", "new", "key", "value", "pairs", "from", "upstream", "." ]
8a903c1d930f82f4b9ee657d62d123782dd2ed59
https://github.com/acquia/blt/blob/8a903c1d930f82f4b9ee657d62d123782dd2ed59/src/Robo/Commands/Blt/UpdateCommand.php#L359-L372
train
acquia/blt
src/Robo/Commands/Blt/UpdateCommand.php
UpdateCommand.setProjectName
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; YamlMunge::writeFile...
php
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; YamlMunge::writeFile...
[ "protected", "function", "setProjectName", "(", ")", "{", "$", "project_name", "=", "basename", "(", "$", "this", "->", "getConfigValue", "(", "'repo.root'", ")", ")", ";", "$", "project_yml", "=", "$", "this", "->", "getConfigValue", "(", "'blt.config-files.p...
Sets project.name using the directory name of repot.root. @return \Robo\Result
[ "Sets", "project", ".", "name", "using", "the", "directory", "name", "of", "repot", ".", "root", "." ]
8a903c1d930f82f4b9ee657d62d123782dd2ed59
https://github.com/acquia/blt/blob/8a903c1d930f82f4b9ee657d62d123782dd2ed59/src/Robo/Commands/Blt/UpdateCommand.php#L379-L385
train
acquia/blt
src/Update/DoPackagistConverter.php
DoPackagistConverter.convertComposerJson
public static function convertComposerJson($composer_json) { // Update version constraints in require. foreach ($composer_json['require'] as $package_name => $version_constraint) { if ($package_name == 'drupal/core') { continue; } if (strstr($package_name, 'drupal/')) { $compos...
php
public static function convertComposerJson($composer_json) { // Update version constraints in require. foreach ($composer_json['require'] as $package_name => $version_constraint) { if ($package_name == 'drupal/core') { continue; } if (strstr($package_name, 'drupal/')) { $compos...
[ "public", "static", "function", "convertComposerJson", "(", "$", "composer_json", ")", "{", "// Update version constraints in require.", "foreach", "(", "$", "composer_json", "[", "'require'", "]", "as", "$", "package_name", "=>", "$", "version_constraint", ")", "{", ...
Converts composer.json from packagist.drupal-composer.org to D.O format. @param array $composer_json The composer.json array. @return array The modified composer.json array.
[ "Converts", "composer", ".", "json", "from", "packagist", ".", "drupal", "-", "composer", ".", "org", "to", "D", ".", "O", "format", "." ]
8a903c1d930f82f4b9ee657d62d123782dd2ed59
https://github.com/acquia/blt/blob/8a903c1d930f82f4b9ee657d62d123782dd2ed59/src/Update/DoPackagistConverter.php#L19-L55
train
acquia/blt
src/Update/DoPackagistConverter.php
DoPackagistConverter.convertVersionConstraint
protected static function convertVersionConstraint($version_constraint) { /* * 8.2.x-dev => 2.x-dev * 8.x-2.x-dev => 2.x-dev * 8.2.x-dev#a1b2c3 => 2.x-dev#a1b2c3 * 8.x-2.x-dev#a1b2c3 => 2.x-dev#a1b2c3 */ if (preg_match('/-dev(#[0-9a-f]+)?$/', $version_constraint)) { return preg_r...
php
protected static function convertVersionConstraint($version_constraint) { /* * 8.2.x-dev => 2.x-dev * 8.x-2.x-dev => 2.x-dev * 8.2.x-dev#a1b2c3 => 2.x-dev#a1b2c3 * 8.x-2.x-dev#a1b2c3 => 2.x-dev#a1b2c3 */ if (preg_match('/-dev(#[0-9a-f]+)?$/', $version_constraint)) { return preg_r...
[ "protected", "static", "function", "convertVersionConstraint", "(", "$", "version_constraint", ")", "{", "/*\n * 8.2.x-dev => 2.x-dev\n * 8.x-2.x-dev => 2.x-dev\n * 8.2.x-dev#a1b2c3 => 2.x-dev#a1b2c3\n * 8.x-2.x-dev#a1b2c3 => 2.x-dev#a1b2c3\n */", "if", "(", "preg_match",...
Converts from to to packagist.drupal-composer.org to D.O format. @param string $version_constraint The packagist.drupal-composer.org style version constraint. @return string The to packages.drupal.org/8 style constraint.
[ "Converts", "from", "to", "to", "packagist", ".", "drupal", "-", "composer", ".", "org", "to", "D", ".", "O", "format", "." ]
8a903c1d930f82f4b9ee657d62d123782dd2ed59
https://github.com/acquia/blt/blob/8a903c1d930f82f4b9ee657d62d123782dd2ed59/src/Update/DoPackagistConverter.php#L66-L147
train
acquia/blt
src/Robo/Commands/Artifact/FactoryHooksCommand.php
FactoryHooksCommand.updateAcsfSites
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'); }
php
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'); }
[ "public", "function", "updateAcsfSites", "(", "$", "site", ",", "$", "target_env", ")", "{", "$", "this", "->", "say", "(", "\"Running updates for site <comment>$site</comment> in environment <comment>$target_env</comment>.\"", ")", ";", "$", "this", "->", "switchSiteCont...
Executes updates against all ACSF sites in the target environment. @param $site @param $target_env @throws \Acquia\Blt\Robo\Exceptions\BltException
[ "Executes", "updates", "against", "all", "ACSF", "sites", "in", "the", "target", "environment", "." ]
8a903c1d930f82f4b9ee657d62d123782dd2ed59
https://github.com/acquia/blt/blob/8a903c1d930f82f4b9ee657d62d123782dd2ed59/src/Robo/Commands/Artifact/FactoryHooksCommand.php#L36-L40
train
KnpLabs/php-github-api
lib/Github/Api/Issue/Timeline.php
Timeline.all
public function all($username, $repository, $issue) { return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/issues/'.rawurlencode($issue).'/timeline'); }
php
public function all($username, $repository, $issue) { return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/issues/'.rawurlencode($issue).'/timeline'); }
[ "public", "function", "all", "(", "$", "username", ",", "$", "repository", ",", "$", "issue", ")", "{", "return", "$", "this", "->", "get", "(", "'/repos/'", ".", "rawurlencode", "(", "$", "username", ")", ".", "'/'", ".", "rawurlencode", "(", "$", "...
Get all events for a specific issue. @link https://developer.github.com/v3/issues/timeline/#list-events-for-an-issue @param string $username @param string $repository @param int $issue @return array
[ "Get", "all", "events", "for", "a", "specific", "issue", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Issue/Timeline.php#L30-L33
train
KnpLabs/php-github-api
lib/Github/Api/Organization.php
Organization.repositories
public function repositories($organization, $type = 'all', $page = 1) { return $this->get('/orgs/'.rawurlencode($organization).'/repos', [ 'type' => $type, 'page' => $page, ]); }
php
public function repositories($organization, $type = 'all', $page = 1) { return $this->get('/orgs/'.rawurlencode($organization).'/repos', [ 'type' => $type, 'page' => $page, ]); }
[ "public", "function", "repositories", "(", "$", "organization", ",", "$", "type", "=", "'all'", ",", "$", "page", "=", "1", ")", "{", "return", "$", "this", "->", "get", "(", "'/orgs/'", ".", "rawurlencode", "(", "$", "organization", ")", ".", "'/repos...
List all repositories across all the organizations that you can access. @link http://developer.github.com/v3/repos/#list-organization-repositories @param string $organization the user name @param string $type the type of repositories @param int $page the page @return array the repositories
[ "List", "all", "repositories", "across", "all", "the", "organizations", "that", "you", "can", "access", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Organization.php#L59-L65
train
KnpLabs/php-github-api
lib/Github/Api/Apps.php
Apps.createInstallationToken
public function createInstallationToken($installationId, $userId = null) { $parameters = []; if ($userId) { $parameters['user_id'] = $userId; } return $this->post('/app/installations/'.rawurlencode($installationId).'/access_tokens', $parameters); }
php
public function createInstallationToken($installationId, $userId = null) { $parameters = []; if ($userId) { $parameters['user_id'] = $userId; } return $this->post('/app/installations/'.rawurlencode($installationId).'/access_tokens', $parameters); }
[ "public", "function", "createInstallationToken", "(", "$", "installationId", ",", "$", "userId", "=", "null", ")", "{", "$", "parameters", "=", "[", "]", ";", "if", "(", "$", "userId", ")", "{", "$", "parameters", "[", "'user_id'", "]", "=", "$", "user...
Create an access token for an installation. @param int $installationId An integration installation id @param int $userId An optional user id on behalf of whom the token will be requested @link https://developer.github.com/v3/apps/#create-a-new-installation-token @return array token and token metadata
[ "Create", "an", "access", "token", "for", "an", "installation", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Apps.php#L23-L31
train
KnpLabs/php-github-api
lib/Github/Api/Apps.php
Apps.listRepositories
public function listRepositories($userId = null) { $parameters = []; if ($userId) { $parameters['user_id'] = $userId; } return $this->get('/installation/repositories', $parameters); }
php
public function listRepositories($userId = null) { $parameters = []; if ($userId) { $parameters['user_id'] = $userId; } return $this->get('/installation/repositories', $parameters); }
[ "public", "function", "listRepositories", "(", "$", "userId", "=", "null", ")", "{", "$", "parameters", "=", "[", "]", ";", "if", "(", "$", "userId", ")", "{", "$", "parameters", "[", "'user_id'", "]", "=", "$", "userId", ";", "}", "return", "$", "...
List repositories that are accessible to the authenticated installation. @link https://developer.github.com/v3/apps/installations/#list-repositories @param int $userId @return array
[ "List", "repositories", "that", "are", "accessible", "to", "the", "authenticated", "installation", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Apps.php#L54-L62
train
KnpLabs/php-github-api
lib/Github/Api/GitData/References.php
References.show
public function show($username, $repository, $reference) { $reference = $this->encodeReference($reference); return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/refs/'.$reference); }
php
public function show($username, $repository, $reference) { $reference = $this->encodeReference($reference); return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/refs/'.$reference); }
[ "public", "function", "show", "(", "$", "username", ",", "$", "repository", ",", "$", "reference", ")", "{", "$", "reference", "=", "$", "this", "->", "encodeReference", "(", "$", "reference", ")", ";", "return", "$", "this", "->", "get", "(", "'/repos...
Show the reference of a repository. @param string $username @param string $repository @param string $reference @return array
[ "Show", "the", "reference", "of", "a", "repository", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/GitData/References.php#L63-L68
train
KnpLabs/php-github-api
lib/Github/Api/GitData/References.php
References.update
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...
php
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...
[ "public", "function", "update", "(", "$", "username", ",", "$", "repository", ",", "$", "reference", ",", "array", "$", "params", ")", "{", "if", "(", "!", "isset", "(", "$", "params", "[", "'sha'", "]", ")", ")", "{", "throw", "new", "MissingArgumen...
Update a reference for a repository. @param string $username @param string $repository @param string $reference @param array $params @throws \Github\Exception\MissingArgumentException @return array
[ "Update", "a", "reference", "for", "a", "repository", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/GitData/References.php#L102-L111
train
KnpLabs/php-github-api
lib/Github/Api/GitData/References.php
References.remove
public function remove($username, $repository, $reference) { $reference = $this->encodeReference($reference); return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/refs/'.$reference); }
php
public function remove($username, $repository, $reference) { $reference = $this->encodeReference($reference); return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/refs/'.$reference); }
[ "public", "function", "remove", "(", "$", "username", ",", "$", "repository", ",", "$", "reference", ")", "{", "$", "reference", "=", "$", "this", "->", "encodeReference", "(", "$", "reference", ")", ";", "return", "$", "this", "->", "delete", "(", "'/...
Delete a reference of a repository. @param string $username @param string $repository @param string $reference @return array
[ "Delete", "a", "reference", "of", "a", "repository", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/GitData/References.php#L122-L127
train
KnpLabs/php-github-api
lib/Github/Api/GitData/Trees.php
Trees.show
public function show($username, $repository, $sha, $recursive = false) { return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/trees/'.rawurlencode($sha), $recursive ? ['recursive' => 1] : []); }
php
public function show($username, $repository, $sha, $recursive = false) { return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/trees/'.rawurlencode($sha), $recursive ? ['recursive' => 1] : []); }
[ "public", "function", "show", "(", "$", "username", ",", "$", "repository", ",", "$", "sha", ",", "$", "recursive", "=", "false", ")", "{", "return", "$", "this", "->", "get", "(", "'/repos/'", ".", "rawurlencode", "(", "$", "username", ")", ".", "'/...
Get the tree for a repository. @param string $username @param string $repository @param string $sha @param bool $recursive @return array
[ "Get", "the", "tree", "for", "a", "repository", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/GitData/Trees.php#L25-L28
train
KnpLabs/php-github-api
lib/Github/Api/GitData/Trees.php
Trees.create
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']]; } foreac...
php
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']]; } foreac...
[ "public", "function", "create", "(", "$", "username", ",", "$", "repository", ",", "array", "$", "params", ")", "{", "if", "(", "!", "isset", "(", "$", "params", "[", "'tree'", "]", ")", "||", "!", "is_array", "(", "$", "params", "[", "'tree'", "]"...
Create tree for a repository. @param string $username @param string $repository @param array $params @throws \Github\Exception\MissingArgumentException @return array
[ "Create", "tree", "for", "a", "repository", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/GitData/Trees.php#L41-L63
train
KnpLabs/php-github-api
lib/Github/Api/Gist/Comments.php
Comments.configure
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; }
php
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; }
[ "public", "function", "configure", "(", "$", "bodyType", "=", "null", ")", "{", "if", "(", "!", "in_array", "(", "$", "bodyType", ",", "[", "'text'", ",", "'html'", ",", "'full'", "]", ")", ")", "{", "$", "bodyType", "=", "'raw'", ";", "}", "$", ...
Configure the body type. @link https://developer.github.com/v3/gists/comments/#custom-media-types @param string|null $bodyType @return self
[ "Configure", "the", "body", "type", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Gist/Comments.php#L26-L35
train
KnpLabs/php-github-api
lib/Github/Api/Gist/Comments.php
Comments.update
public function update($gist, $comment_id, $body) { return $this->patch('/gists/'.rawurlencode($gist).'/comments/'.rawurlencode($comment_id), ['body' => $body]); }
php
public function update($gist, $comment_id, $body) { return $this->patch('/gists/'.rawurlencode($gist).'/comments/'.rawurlencode($comment_id), ['body' => $body]); }
[ "public", "function", "update", "(", "$", "gist", ",", "$", "comment_id", ",", "$", "body", ")", "{", "return", "$", "this", "->", "patch", "(", "'/gists/'", ".", "rawurlencode", "(", "$", "gist", ")", ".", "'/comments/'", ".", "rawurlencode", "(", "$"...
Create a comment for a gist. @param string $gist @param int $comment_id @param string $body @return array
[ "Create", "a", "comment", "for", "a", "gist", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Gist/Comments.php#L84-L87
train
KnpLabs/php-github-api
lib/Github/Api/User.php
User.following
public function following($username, array $parameters = [], array $requestHeaders = []) { return $this->get('/users/'.rawurlencode($username).'/following', $parameters, $requestHeaders); }
php
public function following($username, array $parameters = [], array $requestHeaders = []) { return $this->get('/users/'.rawurlencode($username).'/following', $parameters, $requestHeaders); }
[ "public", "function", "following", "(", "$", "username", ",", "array", "$", "parameters", "=", "[", "]", ",", "array", "$", "requestHeaders", "=", "[", "]", ")", "{", "return", "$", "this", "->", "get", "(", "'/users/'", ".", "rawurlencode", "(", "$", ...
Request the users that a specific user is following. @link http://developer.github.com/v3/users/followers/ @param string $username the username @param array $parameters parameters for the query string @param array $requestHeaders additional headers to set in the request @return array list of followed use...
[ "Request", "the", "users", "that", "a", "specific", "user", "is", "following", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/User.php#L99-L102
train
KnpLabs/php-github-api
lib/Github/Api/User.php
User.followers
public function followers($username, array $parameters = [], array $requestHeaders = []) { return $this->get('/users/'.rawurlencode($username).'/followers', $parameters, $requestHeaders); }
php
public function followers($username, array $parameters = [], array $requestHeaders = []) { return $this->get('/users/'.rawurlencode($username).'/followers', $parameters, $requestHeaders); }
[ "public", "function", "followers", "(", "$", "username", ",", "array", "$", "parameters", "=", "[", "]", ",", "array", "$", "requestHeaders", "=", "[", "]", ")", "{", "return", "$", "this", "->", "get", "(", "'/users/'", ".", "rawurlencode", "(", "$", ...
Request the users following a specific user. @link http://developer.github.com/v3/users/followers/ @param string $username the username @param array $parameters parameters for the query string @param array $requestHeaders additional headers to set in the request @return array list of following users
[ "Request", "the", "users", "following", "a", "specific", "user", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/User.php#L115-L118
train
KnpLabs/php-github-api
lib/Github/Api/User.php
User.starred
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, ...
php
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, ...
[ "public", "function", "starred", "(", "$", "username", ",", "$", "page", "=", "1", ",", "$", "perPage", "=", "30", ",", "$", "sort", "=", "'created'", ",", "$", "direction", "=", "'desc'", ")", "{", "return", "$", "this", "->", "get", "(", "'/users...
Request starred repositories that a specific user has starred. @link http://developer.github.com/v3/activity/starring/ @param string $username the username @param int $page the page number of the paginated result set @param int $perPage the number of results per page @param string $sort sort by (po...
[ "Request", "starred", "repositories", "that", "a", "specific", "user", "has", "starred", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/User.php#L147-L155
train
KnpLabs/php-github-api
lib/Github/Api/PullRequest.php
PullRequest.status
public function status($username, $repository, $id) { $link = $this->show($username, $repository, $id)['_links']['statuses']['href']; return $this->get($link); }
php
public function status($username, $repository, $id) { $link = $this->show($username, $repository, $id)['_links']['statuses']['href']; return $this->get($link); }
[ "public", "function", "status", "(", "$", "username", ",", "$", "repository", ",", "$", "id", ")", "{", "$", "link", "=", "$", "this", "->", "show", "(", "$", "username", ",", "$", "repository", ",", "$", "id", ")", "[", "'_links'", "]", "[", "'s...
All statuses which are the statuses of its head branch. @see http://developer.github.com/v3/pulls/ @param string $username the username @param string $repository the repository @param int $id the ID of the pull request for which statuses are retrieved @return array array of statuses for the project
[ "All", "statuses", "which", "are", "the", "statuses", "of", "its", "head", "branch", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/PullRequest.php#L109-L114
train
KnpLabs/php-github-api
lib/Github/Api/Repository/Contents.php
Contents.readme
public function readme($username, $repository, $reference = null) { return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/readme', [ 'ref' => $reference, ]); }
php
public function readme($username, $repository, $reference = null) { return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/readme', [ 'ref' => $reference, ]); }
[ "public", "function", "readme", "(", "$", "username", ",", "$", "repository", ",", "$", "reference", "=", "null", ")", "{", "return", "$", "this", "->", "get", "(", "'/repos/'", ".", "rawurlencode", "(", "$", "username", ")", ".", "'/'", ".", "rawurlen...
Get content of README file in a repository. @link http://developer.github.com/v3/repos/contents/ @param string $username the user who owns the repository @param string $repository the name of the repository @param null|string $reference reference to a branch or commit @return array information for READM...
[ "Get", "content", "of", "README", "file", "in", "a", "repository", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Repository/Contents.php#L52-L57
train
KnpLabs/php-github-api
lib/Github/Api/Repository/Contents.php
Contents.show
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' => $re...
php
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' => $re...
[ "public", "function", "show", "(", "$", "username", ",", "$", "repository", ",", "$", "path", "=", "null", ",", "$", "reference", "=", "null", ")", "{", "$", "url", "=", "'/repos/'", ".", "rawurlencode", "(", "$", "username", ")", ".", "'/'", ".", ...
Get contents of any file or directory in a repository. @link http://developer.github.com/v3/repos/contents/ @param string $username the user who owns the repository @param string $repository the name of the repository @param null|string $path path to file or directory @param null|string $reference ...
[ "Get", "contents", "of", "any", "file", "or", "directory", "in", "a", "repository", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Repository/Contents.php#L71-L81
train
KnpLabs/php-github-api
lib/Github/Api/Repository/Contents.php
Contents.create
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), 'me...
php
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), 'me...
[ "public", "function", "create", "(", "$", "username", ",", "$", "repository", ",", "$", "path", ",", "$", "content", ",", "$", "message", ",", "$", "branch", "=", "null", ",", "array", "$", "committer", "=", "null", ")", "{", "$", "url", "=", "'/re...
Creates a new file in a repository. @link http://developer.github.com/v3/repos/contents/#create-a-file @param string $username the user who owns the repository @param string $repository the name of the repository @param string $path path to file @param string $content contents of the ne...
[ "Creates", "a", "new", "file", "in", "a", "repository", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Repository/Contents.php#L100-L121
train
KnpLabs/php-github-api
lib/Github/Api/Repository/Contents.php
Contents.exists
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, [ ...
php
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, [ ...
[ "public", "function", "exists", "(", "$", "username", ",", "$", "repository", ",", "$", "path", ",", "$", "reference", "=", "null", ")", "{", "$", "url", "=", "'/repos/'", ".", "rawurlencode", "(", "$", "username", ")", ".", "'/'", ".", "rawurlencode",...
Checks that a given path exists in a repository. @param string $username the user who owns the repository @param string $repository the name of the repository @param string $path path of file to check @param null|string $reference reference to a branch or commit @return bool
[ "Checks", "that", "a", "given", "path", "exists", "in", "a", "repository", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Repository/Contents.php#L133-L156
train
KnpLabs/php-github-api
lib/Github/Api/Repository/Contents.php
Contents.rm
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, ...
php
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, ...
[ "public", "function", "rm", "(", "$", "username", ",", "$", "repository", ",", "$", "path", ",", "$", "message", ",", "$", "sha", ",", "$", "branch", "=", "null", ",", "array", "$", "committer", "=", "null", ")", "{", "$", "url", "=", "'/repos/'", ...
Deletes a file from a repository. @link http://developer.github.com/v3/repos/contents/#delete-a-file @param string $username the user who owns the repository @param string $repository the name of the repository @param string $path path to file @param string $message the commit message @...
[ "Deletes", "a", "file", "from", "a", "repository", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Repository/Contents.php#L217-L238
train
KnpLabs/php-github-api
lib/Github/Api/Repository/Contents.php
Contents.archive
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 ...
php
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 ...
[ "public", "function", "archive", "(", "$", "username", ",", "$", "repository", ",", "$", "format", ",", "$", "reference", "=", "null", ")", "{", "if", "(", "!", "in_array", "(", "$", "format", ",", "[", "'tarball'", ",", "'zipball'", "]", ")", ")", ...
Get content of archives in a repository. @link http://developer.github.com/v3/repos/contents/ @param string $username the user who owns the repository @param string $repository the name of the repository @param string $format format of archive: tarball or zipball @param null|string $reference re...
[ "Get", "content", "of", "archives", "in", "a", "repository", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Repository/Contents.php#L252-L260
train
KnpLabs/php-github-api
lib/Github/Api/Repository/Contents.php
Contents.download
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('Path "%s" is not a...
php
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('Path "%s" is not a...
[ "public", "function", "download", "(", "$", "username", ",", "$", "repository", ",", "$", "path", ",", "$", "reference", "=", "null", ")", "{", "$", "file", "=", "$", "this", "->", "show", "(", "$", "username", ",", "$", "repository", ",", "$", "pa...
Get the contents of a file in a repository. @param string $username the user who owns the repository @param string $repository the name of the repository @param string $path path to file @param null|string $reference reference to a branch or commit @throws InvalidArgumentException If $path is ...
[ "Get", "the", "contents", "of", "a", "file", "in", "a", "repository", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Repository/Contents.php#L275-L296
train
KnpLabs/php-github-api
lib/Github/Api/Issue.php
Issue.find
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).'/'.rawurlencode($keyword));...
php
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).'/'.rawurlencode($keyword));...
[ "public", "function", "find", "(", "$", "username", ",", "$", "repository", ",", "$", "state", ",", "$", "keyword", ")", "{", "if", "(", "!", "in_array", "(", "$", "state", ",", "[", "'open'", ",", "'closed'", "]", ")", ")", "{", "$", "state", "=...
Search issues by username, repo, state and keyword. @deprecated This method is deprecated use the Search api instead. See https://developer.github.com/v3/search/legacy/#legacy-search-api-is-deprecated @link http://developer.github.com/v3/search/#search-issues @param string $username the username @param string $repo...
[ "Search", "issues", "by", "username", "repo", "state", "and", "keyword", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Issue.php#L74-L81
train
KnpLabs/php-github-api
lib/Github/Api/Issue.php
Issue.org
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)); }
php
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)); }
[ "public", "function", "org", "(", "$", "organization", ",", "$", "state", ",", "array", "$", "params", "=", "[", "]", ")", "{", "if", "(", "!", "in_array", "(", "$", "state", ",", "[", "'open'", ",", "'closed'", "]", ")", ")", "{", "$", "state", ...
List issues by organization. @link http://developer.github.com/v3/issues/ @param string $organization the organization @param string $state the issue state, can be open or closed @param array $params the additional parameters like milestone, assignees, labels, sort, direction @return array list of issu...
[ "List", "issues", "by", "organization", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Issue.php#L94-L101
train
KnpLabs/php-github-api
lib/Github/Api/Issue.php
Issue.lock
public function lock($username, $repository, $id) { return $this->put('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/issues/'.rawurlencode($id).'/lock'); }
php
public function lock($username, $repository, $id) { return $this->put('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/issues/'.rawurlencode($id).'/lock'); }
[ "public", "function", "lock", "(", "$", "username", ",", "$", "repository", ",", "$", "id", ")", "{", "return", "$", "this", "->", "put", "(", "'/repos/'", ".", "rawurlencode", "(", "$", "username", ")", ".", "'/'", ".", "rawurlencode", "(", "$", "re...
Lock an issue. Users with push access can lock an issue's conversation. @link https://developer.github.com/v3/issues/#lock-an-issue @param string $username @param string $repository @param int $id @return string
[ "Lock", "an", "issue", ".", "Users", "with", "push", "access", "can", "lock", "an", "issue", "s", "conversation", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Issue.php#L171-L174
train
KnpLabs/php-github-api
lib/Github/Api/Issue.php
Issue.unlock
public function unlock($username, $repository, $id) { return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/issues/'.rawurlencode($id).'/lock'); }
php
public function unlock($username, $repository, $id) { return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/issues/'.rawurlencode($id).'/lock'); }
[ "public", "function", "unlock", "(", "$", "username", ",", "$", "repository", ",", "$", "id", ")", "{", "return", "$", "this", "->", "delete", "(", "'/repos/'", ".", "rawurlencode", "(", "$", "username", ")", ".", "'/'", ".", "rawurlencode", "(", "$", ...
Unlock an issue. Users with push access can unlock an issue's conversation. @link https://developer.github.com/v3/issues/#lock-an-issue @param string $username @param string $repository @param int $id @return string
[ "Unlock", "an", "issue", ".", "Users", "with", "push", "access", "can", "unlock", "an", "issue", "s", "conversation", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Issue.php#L187-L190
train
KnpLabs/php-github-api
lib/Github/Api/RateLimit.php
RateLimit.getResource
public function getResource($name) { // Fetch once per instance if (empty($this->resources)) { $this->fetchLimits(); } if (!isset($this->resources[$name])) { return false; } return $this->resources[$name]; }
php
public function getResource($name) { // Fetch once per instance if (empty($this->resources)) { $this->fetchLimits(); } if (!isset($this->resources[$name])) { return false; } return $this->resources[$name]; }
[ "public", "function", "getResource", "(", "$", "name", ")", "{", "// Fetch once per instance", "if", "(", "empty", "(", "$", "this", "->", "resources", ")", ")", "{", "$", "this", "->", "fetchLimits", "(", ")", ";", "}", "if", "(", "!", "isset", "(", ...
Returns a rate limit resource object by the given name. @param string $name @return RateLimitResource|false
[ "Returns", "a", "rate", "limit", "resource", "object", "by", "the", "given", "name", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/RateLimit.php#L52-L64
train
KnpLabs/php-github-api
lib/Github/Api/RateLimit.php
RateLimit.fetchLimits
protected function fetchLimits() { $result = $this->get('/rate_limit') ?: []; // Assemble Limit instances foreach ($result['resources'] as $resourceName => $resource) { $this->resources[$resourceName] = new RateLimitResource($resourceName, $resource); } return $...
php
protected function fetchLimits() { $result = $this->get('/rate_limit') ?: []; // Assemble Limit instances foreach ($result['resources'] as $resourceName => $resource) { $this->resources[$resourceName] = new RateLimitResource($resourceName, $resource); } return $...
[ "protected", "function", "fetchLimits", "(", ")", "{", "$", "result", "=", "$", "this", "->", "get", "(", "'/rate_limit'", ")", "?", ":", "[", "]", ";", "// Assemble Limit instances", "foreach", "(", "$", "result", "[", "'resources'", "]", "as", "$", "re...
Returns the data directly from the GitHub API endpoint. @return array
[ "Returns", "the", "data", "directly", "from", "the", "GitHub", "API", "endpoint", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/RateLimit.php#L71-L81
train
KnpLabs/php-github-api
lib/Github/Api/Deployment.php
Deployment.updateStatus
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($id).'/stat...
php
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($id).'/stat...
[ "public", "function", "updateStatus", "(", "$", "username", ",", "$", "repository", ",", "$", "id", ",", "array", "$", "params", ")", "{", "if", "(", "!", "isset", "(", "$", "params", "[", "'state'", "]", ")", ")", "{", "throw", "new", "MissingArgume...
Updates a deployment by creating a new status update. @link https://developer.github.com/v3/repos/deployments/#create-a-deployment-status @param string $username the username @param string $repository the repository @param int $id the deployment number @param array $params The information about the ...
[ "Updates", "a", "deployment", "by", "creating", "a", "new", "status", "update", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Deployment.php#L85-L92
train
KnpLabs/php-github-api
lib/Github/Api/Deployment.php
Deployment.getStatuses
public function getStatuses($username, $repository, $id) { return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/deployments/'.rawurlencode($id).'/statuses'); }
php
public function getStatuses($username, $repository, $id) { return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/deployments/'.rawurlencode($id).'/statuses'); }
[ "public", "function", "getStatuses", "(", "$", "username", ",", "$", "repository", ",", "$", "id", ")", "{", "return", "$", "this", "->", "get", "(", "'/repos/'", ".", "rawurlencode", "(", "$", "username", ")", ".", "'/'", ".", "rawurlencode", "(", "$"...
Gets all of the status updates tied to a given deployment. @param string $username the username @param string $repository the repository @param int $id the deployment identifier @return array the deployment statuses
[ "Gets", "all", "of", "the", "status", "updates", "tied", "to", "a", "given", "deployment", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Deployment.php#L103-L106
train
KnpLabs/php-github-api
lib/Github/HttpClient/Message/ResponseMediator.php
ResponseMediator.getHeader
public static function getHeader(ResponseInterface $response, $name) { $headers = $response->getHeader($name); return array_shift($headers); }
php
public static function getHeader(ResponseInterface $response, $name) { $headers = $response->getHeader($name); return array_shift($headers); }
[ "public", "static", "function", "getHeader", "(", "ResponseInterface", "$", "response", ",", "$", "name", ")", "{", "$", "headers", "=", "$", "response", "->", "getHeader", "(", "$", "name", ")", ";", "return", "array_shift", "(", "$", "headers", ")", ";...
Get the value for a single header. @param ResponseInterface $response @param string $name @return string|null
[ "Get", "the", "value", "for", "a", "single", "header", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/HttpClient/Message/ResponseMediator.php#L76-L81
train
KnpLabs/php-github-api
lib/Github/Api/Notification.php
Notification.all
public function all($includingRead = false, $participating = false, DateTime $since = null, DateTime $before = null) { $parameters = [ 'all' => $includingRead, 'participating' => $participating, ]; if ($since !== null) { $parameters['since'] = $since->for...
php
public function all($includingRead = false, $participating = false, DateTime $since = null, DateTime $before = null) { $parameters = [ 'all' => $includingRead, 'participating' => $participating, ]; if ($since !== null) { $parameters['since'] = $since->for...
[ "public", "function", "all", "(", "$", "includingRead", "=", "false", ",", "$", "participating", "=", "false", ",", "DateTime", "$", "since", "=", "null", ",", "DateTime", "$", "before", "=", "null", ")", "{", "$", "parameters", "=", "[", "'all'", "=>"...
Get a listing of notifications. @link https://developer.github.com/v3/activity/notifications/ @param bool $includingRead @param bool $participating @param DateTime|null $since @return array array of notifications
[ "Get", "a", "listing", "of", "notifications", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Notification.php#L29-L45
train
KnpLabs/php-github-api
lib/Github/Api/Notification.php
Notification.markRead
public function markRead(DateTime $since = null) { $parameters = []; if ($since !== null) { $parameters['last_read_at'] = $since->format(DateTime::ISO8601); } $this->put('/notifications', $parameters); }
php
public function markRead(DateTime $since = null) { $parameters = []; if ($since !== null) { $parameters['last_read_at'] = $since->format(DateTime::ISO8601); } $this->put('/notifications', $parameters); }
[ "public", "function", "markRead", "(", "DateTime", "$", "since", "=", "null", ")", "{", "$", "parameters", "=", "[", "]", ";", "if", "(", "$", "since", "!==", "null", ")", "{", "$", "parameters", "[", "'last_read_at'", "]", "=", "$", "since", "->", ...
Marks all notifications as read from the current date. Optionally give DateTime to mark as read before that date. @link https://developer.github.com/v3/activity/notifications/#mark-as-read @param DateTime|null $since
[ "Marks", "all", "notifications", "as", "read", "from", "the", "current", "date", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Notification.php#L56-L65
train
KnpLabs/php-github-api
lib/Github/Api/Issue/Assignees.php
Assignees.listAvailable
public function listAvailable($username, $repository, array $parameters = []) { return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/assignees', $parameters); }
php
public function listAvailable($username, $repository, array $parameters = []) { return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/assignees', $parameters); }
[ "public", "function", "listAvailable", "(", "$", "username", ",", "$", "repository", ",", "array", "$", "parameters", "=", "[", "]", ")", "{", "return", "$", "this", "->", "get", "(", "'/repos/'", ".", "rawurlencode", "(", "$", "username", ")", ".", "'...
List all the available assignees to which issues may be assigned. @param string $username @param string $repository @param array $parameters @return array
[ "List", "all", "the", "available", "assignees", "to", "which", "issues", "may", "be", "assigned", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Issue/Assignees.php#L19-L22
train
KnpLabs/php-github-api
lib/Github/Api/Issue/Assignees.php
Assignees.check
public function check($username, $repository, $assignee) { return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/assignees/'.rawurlencode($assignee)); }
php
public function check($username, $repository, $assignee) { return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/assignees/'.rawurlencode($assignee)); }
[ "public", "function", "check", "(", "$", "username", ",", "$", "repository", ",", "$", "assignee", ")", "{", "return", "$", "this", "->", "get", "(", "'/repos/'", ".", "rawurlencode", "(", "$", "username", ")", ".", "'/'", ".", "rawurlencode", "(", "$"...
Check to see if a particular user is an assignee for a repository. @link https://developer.github.com/v3/issues/assignees/#check-assignee @param string $username @param string $repository @param string $assignee @return array
[ "Check", "to", "see", "if", "a", "particular", "user", "is", "an", "assignee", "for", "a", "repository", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Issue/Assignees.php#L35-L38
train
KnpLabs/php-github-api
lib/Github/Api/Issue/Assignees.php
Assignees.add
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...
php
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...
[ "public", "function", "add", "(", "$", "username", ",", "$", "repository", ",", "$", "issue", ",", "array", "$", "parameters", ")", "{", "if", "(", "!", "isset", "(", "$", "parameters", "[", "'assignees'", "]", ")", ")", "{", "throw", "new", "Missing...
Add assignees to an Issue. @link https://developer.github.com/v3/issues/assignees/#add-assignees-to-an-issue @param string $username @param string $repository @param string $issue @param array $parameters @throws MissingArgumentException @return string
[ "Add", "assignees", "to", "an", "Issue", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Issue/Assignees.php#L54-L67
train
KnpLabs/php-github-api
lib/Github/Api/Issue/Assignees.php
Assignees.remove
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/'.rawurlencode($is...
php
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/'.rawurlencode($is...
[ "public", "function", "remove", "(", "$", "username", ",", "$", "repository", ",", "$", "issue", ",", "array", "$", "parameters", ")", "{", "if", "(", "!", "isset", "(", "$", "parameters", "[", "'assignees'", "]", ")", ")", "{", "throw", "new", "Miss...
Remove assignees from an Issue. @link https://developer.github.com/v3/issues/assignees/#remove-assignees-from-an-issue @param string $username @param string $repository @param string $issue @param array $parameters @throws MissingArgumentException @return string
[ "Remove", "assignees", "from", "an", "Issue", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Issue/Assignees.php#L83-L90
train
KnpLabs/php-github-api
lib/Github/Api/Issue/Events.php
Events.show
public function show($username, $repository, $event) { return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/issues/events/'.rawurlencode($event)); }
php
public function show($username, $repository, $event) { return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/issues/events/'.rawurlencode($event)); }
[ "public", "function", "show", "(", "$", "username", ",", "$", "repository", ",", "$", "event", ")", "{", "return", "$", "this", "->", "get", "(", "'/repos/'", ".", "rawurlencode", "(", "$", "username", ")", ".", "'/'", ".", "rawurlencode", "(", "$", ...
Display an event for an issue. @link https://developer.github.com/v3/issues/events/#get-a-single-event @param string $username @param string $repository @param string $event @return array
[ "Display", "an", "event", "for", "an", "issue", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Issue/Events.php#L50-L53
train
KnpLabs/php-github-api
lib/Github/Api/GitData/Blobs.php
Blobs.show
public function show($username, $repository, $sha) { $response = $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/blobs/'.rawurlencode($sha)); return $response; }
php
public function show($username, $repository, $sha) { $response = $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/blobs/'.rawurlencode($sha)); return $response; }
[ "public", "function", "show", "(", "$", "username", ",", "$", "repository", ",", "$", "sha", ")", "{", "$", "response", "=", "$", "this", "->", "get", "(", "'/repos/'", ".", "rawurlencode", "(", "$", "username", ")", ".", "'/'", ".", "rawurlencode", ...
Show a blob of a sha for a repository. @param string $username @param string $repository @param string $sha @return array
[ "Show", "a", "blob", "of", "a", "sha", "for", "a", "repository", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/GitData/Blobs.php#L44-L49
train
KnpLabs/php-github-api
lib/Github/Api/PullRequest/Comments.php
Comments.all
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_merge([ ...
php
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_merge([ ...
[ "public", "function", "all", "(", "$", "username", ",", "$", "repository", ",", "$", "pullRequest", "=", "null", ",", "array", "$", "params", "=", "[", "]", ")", "{", "if", "(", "null", "!==", "$", "pullRequest", ")", "{", "return", "$", "this", "-...
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. @link https://developer.github.com/v3/pulls/comments/#list-comments-on-a-pull-request @link https://developer.github.com/v3/pulls/comments/#list-comments-in-a-reposi...
[ "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", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/PullRequest/Comments.php#L57-L69
train
KnpLabs/php-github-api
lib/Github/Api/PullRequest/Comments.php
Comments.remove
public function remove($username, $repository, $comment) { return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/pulls/comments/'.rawurlencode($comment)); }
php
public function remove($username, $repository, $comment) { return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/pulls/comments/'.rawurlencode($comment)); }
[ "public", "function", "remove", "(", "$", "username", ",", "$", "repository", ",", "$", "comment", ")", "{", "return", "$", "this", "->", "delete", "(", "'/repos/'", ".", "rawurlencode", "(", "$", "username", ")", ".", "'/'", ".", "rawurlencode", "(", ...
Delete a pull request comment by the username, repository and comment id. @link https://developer.github.com/v3/pulls/comments/#delete-a-comment @param string $username the username @param string $repository the repository @param int $comment the comment id @return string
[ "Delete", "a", "pull", "request", "comment", "by", "the", "username", "repository", "and", "comment", "id", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/PullRequest/Comments.php#L149-L152
train
KnpLabs/php-github-api
lib/Github/Api/Repo.php
Repo.update
public function update($username, $repository, array $values) { return $this->patch('/repos/'.rawurlencode($username).'/'.rawurlencode($repository), $values); }
php
public function update($username, $repository, array $values) { return $this->patch('/repos/'.rawurlencode($username).'/'.rawurlencode($repository), $values); }
[ "public", "function", "update", "(", "$", "username", ",", "$", "repository", ",", "array", "$", "values", ")", "{", "return", "$", "this", "->", "patch", "(", "'/repos/'", ".", "rawurlencode", "(", "$", "username", ")", ".", "'/'", ".", "rawurlencode", ...
Set information of a repository. @link http://developer.github.com/v3/repos/ @param string $username the user who owns the repository @param string $repository the name of the repository @param array $values the key => value pairs to post @return array information about the repository
[ "Set", "information", "of", "a", "repository", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Repo.php#L239-L242
train
KnpLabs/php-github-api
lib/Github/Api/Repo.php
Repo.readme
public function readme($username, $repository, $format = 'raw') { return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/readme', [], [ 'Accept' => "application/vnd.github.$format", ]); }
php
public function readme($username, $repository, $format = 'raw') { return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/readme', [], [ 'Accept' => "application/vnd.github.$format", ]); }
[ "public", "function", "readme", "(", "$", "username", ",", "$", "repository", ",", "$", "format", "=", "'raw'", ")", "{", "return", "$", "this", "->", "get", "(", "'/repos/'", ".", "rawurlencode", "(", "$", "username", ")", ".", "'/'", ".", "rawurlenco...
Get the readme content for a repository by its username and repository name. @link http://developer.github.com/v3/repos/contents/#get-the-readme @param string $username the user who owns the repository @param string $repository the name of the repository @param string $format one of formats: "raw", "html", or "...
[ "Get", "the", "readme", "content", "for", "a", "repository", "by", "its", "username", "and", "repository", "name", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Repo.php#L270-L275
train
KnpLabs/php-github-api
lib/Github/Api/Repo.php
Repo.contributors
public function contributors($username, $repository, $includingAnonymous = false) { return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/contributors', [ 'anon' => $includingAnonymous ?: null, ]); }
php
public function contributors($username, $repository, $includingAnonymous = false) { return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/contributors', [ 'anon' => $includingAnonymous ?: null, ]); }
[ "public", "function", "contributors", "(", "$", "username", ",", "$", "repository", ",", "$", "includingAnonymous", "=", "false", ")", "{", "return", "$", "this", "->", "get", "(", "'/repos/'", ".", "rawurlencode", "(", "$", "username", ")", ".", "'/'", ...
Get the contributors of a repository. @link http://developer.github.com/v3/repos/ @param string $username the user who owns the repository @param string $repository the name of the repository @param bool $includingAnonymous by default, the list only shows GitHub users. You can include non-users to...
[ "Get", "the", "contributors", "of", "a", "repository", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Repo.php#L466-L471
train
KnpLabs/php-github-api
lib/Github/Api/Repo.php
Repo.tags
public function tags($username, $repository, array $params = []) { return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/tags', $params); }
php
public function tags($username, $repository, array $params = []) { return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/tags', $params); }
[ "public", "function", "tags", "(", "$", "username", ",", "$", "repository", ",", "array", "$", "params", "=", "[", "]", ")", "{", "return", "$", "this", "->", "get", "(", "'/repos/'", ".", "rawurlencode", "(", "$", "username", ")", ".", "'/'", ".", ...
Get the tags of a repository. @link http://developer.github.com/v3/repos/ @param string $username the user who owns the repository @param string $repository the name of the repository @param array $params the additional parameters like milestone, assignees, labels, sort, direction @return array list of the re...
[ "Get", "the", "tags", "of", "a", "repository", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Repo.php#L499-L502
train
KnpLabs/php-github-api
lib/Github/Api/Repo.php
Repo.codeOfConduct
public function codeOfConduct($username, $repository) { //This api is in preview mode, so set the correct accept-header $this->acceptHeaderValue = 'application/vnd.github.scarlet-witch-preview+json'; return $this->get('/repos/'.rawurldecode($username).'/'.rawurldecode($repository).'/communi...
php
public function codeOfConduct($username, $repository) { //This api is in preview mode, so set the correct accept-header $this->acceptHeaderValue = 'application/vnd.github.scarlet-witch-preview+json'; return $this->get('/repos/'.rawurldecode($username).'/'.rawurldecode($repository).'/communi...
[ "public", "function", "codeOfConduct", "(", "$", "username", ",", "$", "repository", ")", "{", "//This api is in preview mode, so set the correct accept-header", "$", "this", "->", "acceptHeaderValue", "=", "'application/vnd.github.scarlet-witch-preview+json'", ";", "return", ...
Get the contents of a repository's code of conduct. @link https://developer.github.com/v3/codes_of_conduct/#get-the-contents-of-a-repositorys-code-of-conduct @param string $username @param string $repository @return array
[ "Get", "the", "contents", "of", "a", "repository", "s", "code", "of", "conduct", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Repo.php#L621-L627
train
KnpLabs/php-github-api
lib/Github/Api/Repo.php
Repo.topics
public function topics($username, $repository) { //This api is in preview mode, so set the correct accept-header $this->acceptHeaderValue = 'application/vnd.github.mercy-preview+json'; return $this->get('/repos/'.rawurldecode($username).'/'.rawurldecode($repository).'/topics'); }
php
public function topics($username, $repository) { //This api is in preview mode, so set the correct accept-header $this->acceptHeaderValue = 'application/vnd.github.mercy-preview+json'; return $this->get('/repos/'.rawurldecode($username).'/'.rawurldecode($repository).'/topics'); }
[ "public", "function", "topics", "(", "$", "username", ",", "$", "repository", ")", "{", "//This api is in preview mode, so set the correct accept-header", "$", "this", "->", "acceptHeaderValue", "=", "'application/vnd.github.mercy-preview+json'", ";", "return", "$", "this",...
List all topics for a repository. @link https://developer.github.com/v3/repos/#list-all-topics-for-a-repository @param string $username @param string $repository @return array
[ "List", "all", "topics", "for", "a", "repository", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Repo.php#L639-L645
train
KnpLabs/php-github-api
lib/Github/Api/Repo.php
Repo.replaceTopics
public function replaceTopics($username, $repository, array $topics) { //This api is in preview mode, so set the correct accept-header $this->acceptHeaderValue = 'application/vnd.github.mercy-preview+json'; return $this->put('/repos/'.rawurldecode($username).'/'.rawurldecode($repository).'/...
php
public function replaceTopics($username, $repository, array $topics) { //This api is in preview mode, so set the correct accept-header $this->acceptHeaderValue = 'application/vnd.github.mercy-preview+json'; return $this->put('/repos/'.rawurldecode($username).'/'.rawurldecode($repository).'/...
[ "public", "function", "replaceTopics", "(", "$", "username", ",", "$", "repository", ",", "array", "$", "topics", ")", "{", "//This api is in preview mode, so set the correct accept-header", "$", "this", "->", "acceptHeaderValue", "=", "'application/vnd.github.mercy-preview...
Replace all topics for a repository. @link https://developer.github.com/v3/repos/#replace-all-topics-for-a-repository @param string $username @param string $repository @param array $topics @return array
[ "Replace", "all", "topics", "for", "a", "repository", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Repo.php#L658-L664
train
KnpLabs/php-github-api
lib/Github/Api/Repo.php
Repo.transfer
public function transfer($username, $repository, $newOwner, $teamId = []) { //This api is in preview mode, so set the correct accept-header $this->acceptHeaderValue = 'application/vnd.github.nightshade-preview+json'; return $this->post('/repos/'.rawurldecode($username).'/'.rawurldecode($rep...
php
public function transfer($username, $repository, $newOwner, $teamId = []) { //This api is in preview mode, so set the correct accept-header $this->acceptHeaderValue = 'application/vnd.github.nightshade-preview+json'; return $this->post('/repos/'.rawurldecode($username).'/'.rawurldecode($rep...
[ "public", "function", "transfer", "(", "$", "username", ",", "$", "repository", ",", "$", "newOwner", ",", "$", "teamId", "=", "[", "]", ")", "{", "//This api is in preview mode, so set the correct accept-header", "$", "this", "->", "acceptHeaderValue", "=", "'app...
Transfer a repository. @link https://developer.github.com/v3/repos/#transfer-a-repository @param string $username @param string $repository @param string $newOwner @param array $teamId @return array
[ "Transfer", "a", "repository", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Repo.php#L678-L684
train
KnpLabs/php-github-api
lib/Github/Api/Issue/Milestones.php
Milestones.all
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', 'completeness'])) { ...
php
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', 'completeness'])) { ...
[ "public", "function", "all", "(", "$", "username", ",", "$", "repository", ",", "array", "$", "params", "=", "[", "]", ")", "{", "if", "(", "isset", "(", "$", "params", "[", "'state'", "]", ")", "&&", "!", "in_array", "(", "$", "params", "[", "'s...
Get all milestones for a repository. @link https://developer.github.com/v3/issues/milestones/#list-milestones-for-a-repository @param string $username @param string $repository @param array $params @return array
[ "Get", "all", "milestones", "for", "a", "repository", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Issue/Milestones.php#L26-L44
train
KnpLabs/php-github-api
lib/Github/Api/Issue/Milestones.php
Milestones.create
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'; } ...
php
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'; } ...
[ "public", "function", "create", "(", "$", "username", ",", "$", "repository", ",", "array", "$", "params", ")", "{", "if", "(", "!", "isset", "(", "$", "params", "[", "'title'", "]", ")", ")", "{", "throw", "new", "MissingArgumentException", "(", "'tit...
Create a milestone for a repository. @link https://developer.github.com/v3/issues/milestones/#create-a-milestone @param string $username @param string $repository @param array $params @throws \Github\Exception\MissingArgumentException @return array
[ "Create", "a", "milestone", "for", "a", "repository", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Issue/Milestones.php#L75-L85
train
KnpLabs/php-github-api
lib/Github/Api/Issue/Milestones.php
Milestones.update
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).'/milestones/'....
php
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).'/milestones/'....
[ "public", "function", "update", "(", "$", "username", ",", "$", "repository", ",", "$", "id", ",", "array", "$", "params", ")", "{", "if", "(", "isset", "(", "$", "params", "[", "'state'", "]", ")", "&&", "!", "in_array", "(", "$", "params", "[", ...
Update a milestone for a repository. @link https://developer.github.com/v3/issues/milestones/#update-a-milestone @param string $username @param string $repository @param int $id @param array $params @return array
[ "Update", "a", "milestone", "for", "a", "repository", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Issue/Milestones.php#L99-L106
train
KnpLabs/php-github-api
lib/Github/Api/Issue/Milestones.php
Milestones.remove
public function remove($username, $repository, $id) { return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/milestones/'.rawurlencode($id)); }
php
public function remove($username, $repository, $id) { return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/milestones/'.rawurlencode($id)); }
[ "public", "function", "remove", "(", "$", "username", ",", "$", "repository", ",", "$", "id", ")", "{", "return", "$", "this", "->", "delete", "(", "'/repos/'", ".", "rawurlencode", "(", "$", "username", ")", ".", "'/'", ".", "rawurlencode", "(", "$", ...
Delete a milestone for a repository. @link https://developer.github.com/v3/issues/milestones/#delete-a-milestone @param string $username @param string $repository @param int $id @return array|string
[ "Delete", "a", "milestone", "for", "a", "repository", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Issue/Milestones.php#L119-L122
train
KnpLabs/php-github-api
lib/Github/Api/Issue/Milestones.php
Milestones.labels
public function labels($username, $repository, $id) { return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/milestones/'.rawurlencode($id).'/labels'); }
php
public function labels($username, $repository, $id) { return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/milestones/'.rawurlencode($id).'/labels'); }
[ "public", "function", "labels", "(", "$", "username", ",", "$", "repository", ",", "$", "id", ")", "{", "return", "$", "this", "->", "get", "(", "'/repos/'", ".", "rawurlencode", "(", "$", "username", ")", ".", "'/'", ".", "rawurlencode", "(", "$", "...
Get the labels of a milestone. @link https://developer.github.com/v3/issues/labels/#get-labels-for-every-issue-in-a-milestone @param string $username @param string $repository @param int $id @return array
[ "Get", "the", "labels", "of", "a", "milestone", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Issue/Milestones.php#L135-L138
train
KnpLabs/php-github-api
lib/Github/Api/PullRequest/Review.php
Review.show
public function show($username, $repository, $pullRequest, $id) { return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/pulls/'.$pullRequest.'/reviews/'.$id); }
php
public function show($username, $repository, $pullRequest, $id) { return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/pulls/'.$pullRequest.'/reviews/'.$id); }
[ "public", "function", "show", "(", "$", "username", ",", "$", "repository", ",", "$", "pullRequest", ",", "$", "id", ")", "{", "return", "$", "this", "->", "get", "(", "'/repos/'", ".", "rawurlencode", "(", "$", "username", ")", ".", "'/'", ".", "raw...
Get a single pull request review by the username, repository, pull request number and the review id. @link https://developer.github.com/v3/pulls/reviews/#get-a-single-review @param string $username the username @param string $repository the repository @param int $pullRequest the pull request number @param int ...
[ "Get", "a", "single", "pull", "request", "review", "by", "the", "username", "repository", "pull", "request", "number", "and", "the", "review", "id", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/PullRequest/Review.php#L60-L63
train
KnpLabs/php-github-api
lib/Github/Api/PullRequest/Review.php
Review.comments
public function comments($username, $repository, $pullRequest, $id) { return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/pulls/'.rawurlencode($pullRequest).'/reviews/'.rawurlencode($id).'/comments'); }
php
public function comments($username, $repository, $pullRequest, $id) { return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/pulls/'.rawurlencode($pullRequest).'/reviews/'.rawurlencode($id).'/comments'); }
[ "public", "function", "comments", "(", "$", "username", ",", "$", "repository", ",", "$", "pullRequest", ",", "$", "id", ")", "{", "return", "$", "this", "->", "get", "(", "'/repos/'", ".", "rawurlencode", "(", "$", "username", ")", ".", "'/'", ".", ...
Get comments for a single pull request review. @link https://developer.github.com/v3/pulls/reviews/#get-comments-for-a-single-review @param string $username the username @param string $repository the repository @param int $pullRequest the pull request number @param int $id the review id @return ar...
[ "Get", "comments", "for", "a", "single", "pull", "request", "review", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/PullRequest/Review.php#L94-L97
train
KnpLabs/php-github-api
lib/Github/Api/PullRequest/Review.php
Review.create
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", "REQUEST_CHA...
php
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", "REQUEST_CHA...
[ "public", "function", "create", "(", "$", "username", ",", "$", "repository", ",", "$", "pullRequest", ",", "array", "$", "params", "=", "[", "]", ")", "{", "if", "(", "array_key_exists", "(", "'event'", ",", "$", "params", ")", "&&", "!", "in_array", ...
Create a pull request review by the username, repository and pull request number. @link https://developer.github.com/v3/pulls/reviews/#create-a-pull-request-review @param string $username the username @param string $repository the repository @param int $pullRequest the pull request number @param array $params...
[ "Create", "a", "pull", "request", "review", "by", "the", "username", "repository", "and", "pull", "request", "number", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/PullRequest/Review.php#L113-L120
train
KnpLabs/php-github-api
lib/Github/Api/PullRequest/Review.php
Review.submit
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 Invali...
php
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 Invali...
[ "public", "function", "submit", "(", "$", "username", ",", "$", "repository", ",", "$", "pullRequest", ",", "$", "id", ",", "array", "$", "params", "=", "[", "]", ")", "{", "if", "(", "!", "isset", "(", "$", "params", "[", "'event'", "]", ")", ")...
Submit a pull request review by the username, repository, pull request number and the review id. @link https://developer.github.com/v3/pulls/reviews/#submit-a-pull-request-review @param string $username the username @param string $repository the repository @param int $pullRequest the pull request number @param...
[ "Submit", "a", "pull", "request", "review", "by", "the", "username", "repository", "pull", "request", "number", "and", "the", "review", "id", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/PullRequest/Review.php#L137-L148
train
KnpLabs/php-github-api
lib/Github/Api/PullRequest/Review.php
Review.dismiss
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 InvalidArgu...
php
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 InvalidArgu...
[ "public", "function", "dismiss", "(", "$", "username", ",", "$", "repository", ",", "$", "pullRequest", ",", "$", "id", ",", "$", "message", ")", "{", "if", "(", "!", "is_string", "(", "$", "message", ")", ")", "{", "throw", "new", "InvalidArgumentExce...
Dismiss a pull request review by the username, repository, pull request number and the review id. @link https://developer.github.com/v3/pulls/reviews/#dismiss-a-pull-request-review @param string $username the username @param string $repository the repository @param int $pullRequest the pull request number @par...
[ "Dismiss", "a", "pull", "request", "review", "by", "the", "username", "repository", "pull", "request", "number", "and", "the", "review", "id", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/PullRequest/Review.php#L163-L176
train
KnpLabs/php-github-api
lib/Github/Api/PullRequest/Review.php
Review.update
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('"...
php
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('"...
[ "public", "function", "update", "(", "$", "username", ",", "$", "repository", ",", "$", "pullRequest", ",", "$", "id", ",", "$", "body", ")", "{", "if", "(", "!", "is_string", "(", "$", "body", ")", ")", "{", "throw", "new", "InvalidArgumentException",...
Update a pull request review by the username, repository, pull request number and the review id. @link https://developer.github.com/v3/pulls/reviews/#update-a-pull-request-review @param string $username the username @param string $repository the repository @param int $pullRequest the pull request number @param...
[ "Update", "a", "pull", "request", "review", "by", "the", "username", "repository", "pull", "request", "number", "and", "the", "review", "id", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/PullRequest/Review.php#L191-L204
train
KnpLabs/php-github-api
lib/Github/Client.php
Client.setEnterpriseUrl
private function setEnterpriseUrl($enterpriseUrl) { $builder = $this->getHttpClientBuilder(); $builder->removePlugin(Plugin\AddHostPlugin::class); $builder->removePlugin(PathPrepend::class); $builder->addPlugin(new Plugin\AddHostPlugin(UriFactoryDiscovery::find()->createUri($enterpr...
php
private function setEnterpriseUrl($enterpriseUrl) { $builder = $this->getHttpClientBuilder(); $builder->removePlugin(Plugin\AddHostPlugin::class); $builder->removePlugin(PathPrepend::class); $builder->addPlugin(new Plugin\AddHostPlugin(UriFactoryDiscovery::find()->createUri($enterpr...
[ "private", "function", "setEnterpriseUrl", "(", "$", "enterpriseUrl", ")", "{", "$", "builder", "=", "$", "this", "->", "getHttpClientBuilder", "(", ")", ";", "$", "builder", "->", "removePlugin", "(", "Plugin", "\\", "AddHostPlugin", "::", "class", ")", ";"...
Sets the URL of your GitHub Enterprise instance. @param string $enterpriseUrl URL of the API in the form of http(s)://hostname
[ "Sets", "the", "URL", "of", "your", "GitHub", "Enterprise", "instance", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Client.php#L343-L351
train
KnpLabs/php-github-api
lib/Github/Api/Repository/Protection.php
Protection.show
public function show($username, $repository, $branch) { return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/branches/'.rawurlencode($branch).'/protection'); }
php
public function show($username, $repository, $branch) { return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/branches/'.rawurlencode($branch).'/protection'); }
[ "public", "function", "show", "(", "$", "username", ",", "$", "repository", ",", "$", "branch", ")", "{", "return", "$", "this", "->", "get", "(", "'/repos/'", ".", "rawurlencode", "(", "$", "username", ")", ".", "'/'", ".", "rawurlencode", "(", "$", ...
Retrieves configured protection for the provided branch. @link https://developer.github.com/v3/repos/branches/#get-branch-protection @param string $username The user who owns the repository @param string $repository The name of the repo @param string $branch The name of the branch @return array The branch prot...
[ "Retrieves", "configured", "protection", "for", "the", "provided", "branch", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Repository/Protection.php#L35-L38
train
KnpLabs/php-github-api
lib/Github/Api/Repository/Protection.php
Protection.update
public function update($username, $repository, $branch, array $params = []) { return $this->put('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/branches/'.rawurlencode($branch).'/protection', $params); }
php
public function update($username, $repository, $branch, array $params = []) { return $this->put('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/branches/'.rawurlencode($branch).'/protection', $params); }
[ "public", "function", "update", "(", "$", "username", ",", "$", "repository", ",", "$", "branch", ",", "array", "$", "params", "=", "[", "]", ")", "{", "return", "$", "this", "->", "put", "(", "'/repos/'", ".", "rawurlencode", "(", "$", "username", "...
Updates the repo's branch protection. @link https://developer.github.com/v3/repos/branches/#update-branch-protection @param string $username The user who owns the repository @param string $repository The name of the repo @param string $branch The name of the branch @param array $params The branch protectio...
[ "Updates", "the", "repo", "s", "branch", "protection", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Repository/Protection.php#L52-L55
train
KnpLabs/php-github-api
lib/Github/Api/Repository/Protection.php
Protection.remove
public function remove($username, $repository, $branch) { return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/branches/'.rawurlencode($branch).'/protection'); }
php
public function remove($username, $repository, $branch) { return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/branches/'.rawurlencode($branch).'/protection'); }
[ "public", "function", "remove", "(", "$", "username", ",", "$", "repository", ",", "$", "branch", ")", "{", "return", "$", "this", "->", "delete", "(", "'/repos/'", ".", "rawurlencode", "(", "$", "username", ")", ".", "'/'", ".", "rawurlencode", "(", "...
Remove the repo's branch protection. @link https://developer.github.com/v3/repos/branches/#remove-branch-protection @param string $username The user who owns the repository @param string $repository The name of the repo @param string $branch The name of the branch
[ "Remove", "the", "repo", "s", "branch", "protection", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Repository/Protection.php#L66-L69
train
KnpLabs/php-github-api
lib/Github/Api/Repository/Protection.php
Protection.showStatusChecks
public function showStatusChecks($username, $repository, $branch) { return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/branches/'.rawurlencode($branch).'/protection/required_status_checks'); }
php
public function showStatusChecks($username, $repository, $branch) { return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/branches/'.rawurlencode($branch).'/protection/required_status_checks'); }
[ "public", "function", "showStatusChecks", "(", "$", "username", ",", "$", "repository", ",", "$", "branch", ")", "{", "return", "$", "this", "->", "get", "(", "'/repos/'", ".", "rawurlencode", "(", "$", "username", ")", ".", "'/'", ".", "rawurlencode", "...
Get required status checks of protected branch. @link https://developer.github.com/v3/repos/branches/#get-required-status-checks-of-protected-branch @param string $username The user who owns the repository @param string $repository The name of the repo @param string $branch The name of the branch @return array...
[ "Get", "required", "status", "checks", "of", "protected", "branch", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Repository/Protection.php#L82-L85
train
KnpLabs/php-github-api
lib/Github/Api/Repository/Protection.php
Protection.updateStatusChecks
public function updateStatusChecks($username, $repository, $branch, array $params = []) { return $this->patch('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/branches/'.rawurlencode($branch).'/protection/required_status_checks', $params); }
php
public function updateStatusChecks($username, $repository, $branch, array $params = []) { return $this->patch('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/branches/'.rawurlencode($branch).'/protection/required_status_checks', $params); }
[ "public", "function", "updateStatusChecks", "(", "$", "username", ",", "$", "repository", ",", "$", "branch", ",", "array", "$", "params", "=", "[", "]", ")", "{", "return", "$", "this", "->", "patch", "(", "'/repos/'", ".", "rawurlencode", "(", "$", "...
Update required status checks of protected branch. @link https://developer.github.com/v3/repos/branches/#update-required-status-checks-of-protected-branch @param string $username The user who owns the repository @param string $repository The name of the repo @param string $branch The name of the branch @param a...
[ "Update", "required", "status", "checks", "of", "protected", "branch", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Repository/Protection.php#L99-L102
train
KnpLabs/php-github-api
lib/Github/Api/Repository/Protection.php
Protection.removeStatusChecks
public function removeStatusChecks($username, $repository, $branch) { return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/branches/'.rawurlencode($branch).'/protection/required_status_checks'); }
php
public function removeStatusChecks($username, $repository, $branch) { return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/branches/'.rawurlencode($branch).'/protection/required_status_checks'); }
[ "public", "function", "removeStatusChecks", "(", "$", "username", ",", "$", "repository", ",", "$", "branch", ")", "{", "return", "$", "this", "->", "delete", "(", "'/repos/'", ".", "rawurlencode", "(", "$", "username", ")", ".", "'/'", ".", "rawurlencode"...
Remove required status checks of protected branch. @link https://developer.github.com/v3/repos/branches/#remove-required-status-checks-of-protected-branch @param string $username The user who owns the repository @param string $repository The name of the repo @param string $branch The name of the branch
[ "Remove", "required", "status", "checks", "of", "protected", "branch", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Repository/Protection.php#L113-L116
train
KnpLabs/php-github-api
lib/Github/Api/Repository/Protection.php
Protection.showStatusChecksContexts
public function showStatusChecksContexts($username, $repository, $branch) { return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/branches/'.rawurlencode($branch).'/protection/required_status_checks/contexts'); }
php
public function showStatusChecksContexts($username, $repository, $branch) { return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/branches/'.rawurlencode($branch).'/protection/required_status_checks/contexts'); }
[ "public", "function", "showStatusChecksContexts", "(", "$", "username", ",", "$", "repository", ",", "$", "branch", ")", "{", "return", "$", "this", "->", "get", "(", "'/repos/'", ".", "rawurlencode", "(", "$", "username", ")", ".", "'/'", ".", "rawurlenco...
List required status checks contexts of protected branch. @link https://developer.github.com/v3/repos/branches/#list-required-status-checks-contexts-of-protected-branch @param string $username The user who owns the repository @param string $repository The name of the repo @param string $branch The name of the b...
[ "List", "required", "status", "checks", "contexts", "of", "protected", "branch", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Repository/Protection.php#L129-L132
train
KnpLabs/php-github-api
lib/Github/Api/Repository/Protection.php
Protection.replaceStatusChecksContexts
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); }
php
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); }
[ "public", "function", "replaceStatusChecksContexts", "(", "$", "username", ",", "$", "repository", ",", "$", "branch", ",", "array", "$", "params", "=", "[", "]", ")", "{", "return", "$", "this", "->", "put", "(", "'/repos/'", ".", "rawurlencode", "(", "...
Replace required status checks contexts of protected branch. @link https://developer.github.com/v3/repos/branches/#replace-required-status-checks-contexts-of-protected-branch @param string $username The user who owns the repository @param string $repository The name of the repo @param string $branch The name of...
[ "Replace", "required", "status", "checks", "contexts", "of", "protected", "branch", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Repository/Protection.php#L146-L149
train
KnpLabs/php-github-api
lib/Github/Api/Repository/Protection.php
Protection.addStatusChecksContexts
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); }
php
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); }
[ "public", "function", "addStatusChecksContexts", "(", "$", "username", ",", "$", "repository", ",", "$", "branch", ",", "array", "$", "params", "=", "[", "]", ")", "{", "return", "$", "this", "->", "post", "(", "'/repos/'", ".", "rawurlencode", "(", "$",...
Add required status checks contexts of protected branch. @link https://developer.github.com/v3/repos/branches/#add-required-status-checks-contexts-of-protected-branch @param string $username The user who owns the repository @param string $repository The name of the repo @param string $branch The name of the bra...
[ "Add", "required", "status", "checks", "contexts", "of", "protected", "branch", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Repository/Protection.php#L163-L166
train
KnpLabs/php-github-api
lib/Github/Api/Repository/Protection.php
Protection.removeStatusChecksContexts
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); }
php
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); }
[ "public", "function", "removeStatusChecksContexts", "(", "$", "username", ",", "$", "repository", ",", "$", "branch", ",", "array", "$", "params", "=", "[", "]", ")", "{", "return", "$", "this", "->", "delete", "(", "'/repos/'", ".", "rawurlencode", "(", ...
Remove required status checks contexts of protected branch. @link https://developer.github.com/v3/repos/branches/#remove-required-status-checks-contexts-of-protected-branch @param string $username The user who owns the repository @param string $repository The name of the repo @param string $branch The name of t...
[ "Remove", "required", "status", "checks", "contexts", "of", "protected", "branch", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Repository/Protection.php#L180-L183
train
KnpLabs/php-github-api
lib/Github/Api/Repository/Protection.php
Protection.showPullRequestReviewEnforcement
public function showPullRequestReviewEnforcement($username, $repository, $branch) { return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/branches/'.rawurlencode($branch).'/protection/required_pull_request_reviews'); }
php
public function showPullRequestReviewEnforcement($username, $repository, $branch) { return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/branches/'.rawurlencode($branch).'/protection/required_pull_request_reviews'); }
[ "public", "function", "showPullRequestReviewEnforcement", "(", "$", "username", ",", "$", "repository", ",", "$", "branch", ")", "{", "return", "$", "this", "->", "get", "(", "'/repos/'", ".", "rawurlencode", "(", "$", "username", ")", ".", "'/'", ".", "ra...
Get pull request review enforcement of protected branch. @link https://developer.github.com/v3/repos/branches/#get-pull-request-review-enforcement-of-protected-branch @param string $username The user who owns the repository @param string $repository The name of the repo @param string $branch The name of the bra...
[ "Get", "pull", "request", "review", "enforcement", "of", "protected", "branch", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Repository/Protection.php#L196-L199
train
KnpLabs/php-github-api
lib/Github/Api/Repository/Protection.php
Protection.updatePullRequestReviewEnforcement
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); }
php
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); }
[ "public", "function", "updatePullRequestReviewEnforcement", "(", "$", "username", ",", "$", "repository", ",", "$", "branch", ",", "array", "$", "params", "=", "[", "]", ")", "{", "return", "$", "this", "->", "patch", "(", "'/repos/'", ".", "rawurlencode", ...
Update pull request review enforcement of protected branch. @link https://developer.github.com/v3/repos/branches/#update-pull-request-review-enforcement-of-protected-branch @param string $username The user who owns the repository @param string $repository The name of the repo @param string $branch The name of t...
[ "Update", "pull", "request", "review", "enforcement", "of", "protected", "branch", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Repository/Protection.php#L213-L216
train
KnpLabs/php-github-api
lib/Github/Api/Repository/Protection.php
Protection.removePullRequestReviewEnforcement
public function removePullRequestReviewEnforcement($username, $repository, $branch) { return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/branches/'.rawurlencode($branch).'/protection/required_pull_request_reviews'); }
php
public function removePullRequestReviewEnforcement($username, $repository, $branch) { return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/branches/'.rawurlencode($branch).'/protection/required_pull_request_reviews'); }
[ "public", "function", "removePullRequestReviewEnforcement", "(", "$", "username", ",", "$", "repository", ",", "$", "branch", ")", "{", "return", "$", "this", "->", "delete", "(", "'/repos/'", ".", "rawurlencode", "(", "$", "username", ")", ".", "'/'", ".", ...
Remove pull request review enforcement of protected branch. @link https://developer.github.com/v3/repos/branches/#remove-pull-request-review-enforcement-of-protected-branch @param string $username The user who owns the repository @param string $repository The name of the repo @param string $branch The name of t...
[ "Remove", "pull", "request", "review", "enforcement", "of", "protected", "branch", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Repository/Protection.php#L227-L230
train
KnpLabs/php-github-api
lib/Github/Api/Repository/Protection.php
Protection.showAdminEnforcement
public function showAdminEnforcement($username, $repository, $branch) { return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/branches/'.rawurlencode($branch).'/protection/enforce_admins'); }
php
public function showAdminEnforcement($username, $repository, $branch) { return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/branches/'.rawurlencode($branch).'/protection/enforce_admins'); }
[ "public", "function", "showAdminEnforcement", "(", "$", "username", ",", "$", "repository", ",", "$", "branch", ")", "{", "return", "$", "this", "->", "get", "(", "'/repos/'", ".", "rawurlencode", "(", "$", "username", ")", ".", "'/'", ".", "rawurlencode",...
Get admin enforcement of protected branch. @link https://developer.github.com/v3/repos/branches/#get-admin-enforcement-of-protected-branch @param string $username The user who owns the repository @param string $repository The name of the repo @param string $branch The name of the branch @return array The admin...
[ "Get", "admin", "enforcement", "of", "protected", "branch", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Repository/Protection.php#L243-L246
train
KnpLabs/php-github-api
lib/Github/Api/Repository/Protection.php
Protection.addAdminEnforcement
public function addAdminEnforcement($username, $repository, $branch) { return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/branches/'.rawurlencode($branch).'/protection/enforce_admins'); }
php
public function addAdminEnforcement($username, $repository, $branch) { return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/branches/'.rawurlencode($branch).'/protection/enforce_admins'); }
[ "public", "function", "addAdminEnforcement", "(", "$", "username", ",", "$", "repository", ",", "$", "branch", ")", "{", "return", "$", "this", "->", "post", "(", "'/repos/'", ".", "rawurlencode", "(", "$", "username", ")", ".", "'/'", ".", "rawurlencode",...
Add admin enforcement of protected branch. @link https://developer.github.com/v3/repos/branches/#add-admin-enforcement-of-protected-branch @param string $username The user who owns the repository @param string $repository The name of the repo @param string $branch The name of the branch @return array The updat...
[ "Add", "admin", "enforcement", "of", "protected", "branch", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Repository/Protection.php#L259-L262
train
KnpLabs/php-github-api
lib/Github/Api/Repository/Protection.php
Protection.removeAdminEnforcement
public function removeAdminEnforcement($username, $repository, $branch) { return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/branches/'.rawurlencode($branch).'/protection/enforce_admins'); }
php
public function removeAdminEnforcement($username, $repository, $branch) { return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/branches/'.rawurlencode($branch).'/protection/enforce_admins'); }
[ "public", "function", "removeAdminEnforcement", "(", "$", "username", ",", "$", "repository", ",", "$", "branch", ")", "{", "return", "$", "this", "->", "delete", "(", "'/repos/'", ".", "rawurlencode", "(", "$", "username", ")", ".", "'/'", ".", "rawurlenc...
Remove admin enforcement of protected branch. @link https://developer.github.com/v3/repos/branches/#remove-admin-enforcement-of-protected-branch @param string $username The user who owns the repository @param string $repository The name of the repo @param string $branch The name of the branch
[ "Remove", "admin", "enforcement", "of", "protected", "branch", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Repository/Protection.php#L273-L276
train
KnpLabs/php-github-api
lib/Github/Api/Repository/Protection.php
Protection.showRestrictions
public function showRestrictions($username, $repository, $branch) { return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/branches/'.rawurlencode($branch).'/protection/restrictions'); }
php
public function showRestrictions($username, $repository, $branch) { return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/branches/'.rawurlencode($branch).'/protection/restrictions'); }
[ "public", "function", "showRestrictions", "(", "$", "username", ",", "$", "repository", ",", "$", "branch", ")", "{", "return", "$", "this", "->", "get", "(", "'/repos/'", ".", "rawurlencode", "(", "$", "username", ")", ".", "'/'", ".", "rawurlencode", "...
Get restrictions of protected branch. @link https://developer.github.com/v3/repos/branches/#get-restrictions-of-protected-branch @param string $username The user who owns the repository @param string $repository The name of the repo @param string $branch The name of the branch @return array The branch restrict...
[ "Get", "restrictions", "of", "protected", "branch", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Repository/Protection.php#L289-L292
train
KnpLabs/php-github-api
lib/Github/Api/Repository/Protection.php
Protection.removeRestrictions
public function removeRestrictions($username, $repository, $branch) { return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/branches/'.rawurlencode($branch).'/protection/restrictions'); }
php
public function removeRestrictions($username, $repository, $branch) { return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/branches/'.rawurlencode($branch).'/protection/restrictions'); }
[ "public", "function", "removeRestrictions", "(", "$", "username", ",", "$", "repository", ",", "$", "branch", ")", "{", "return", "$", "this", "->", "delete", "(", "'/repos/'", ".", "rawurlencode", "(", "$", "username", ")", ".", "'/'", ".", "rawurlencode"...
Remove restrictions of protected branch. @link https://developer.github.com/v3/repos/branches/#remove-restrictions-of-protected-branch @param string $username The user who owns the repository @param string $repository The name of the repo @param string $branch The name of the branch
[ "Remove", "restrictions", "of", "protected", "branch", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Repository/Protection.php#L303-L306
train
KnpLabs/php-github-api
lib/Github/Api/Repository/Protection.php
Protection.showTeamRestrictions
public function showTeamRestrictions($username, $repository, $branch) { return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/branches/'.rawurlencode($branch).'/protection/restrictions/teams'); }
php
public function showTeamRestrictions($username, $repository, $branch) { return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/branches/'.rawurlencode($branch).'/protection/restrictions/teams'); }
[ "public", "function", "showTeamRestrictions", "(", "$", "username", ",", "$", "repository", ",", "$", "branch", ")", "{", "return", "$", "this", "->", "get", "(", "'/repos/'", ".", "rawurlencode", "(", "$", "username", ")", ".", "'/'", ".", "rawurlencode",...
List team restrictions of protected branch. @link https://developer.github.com/v3/repos/branches/#list-team-restrictions-of-protected-branch @param string $username The user who owns the repository @param string $repository The name of the repo @param string $branch The name of the branch @return array The bra...
[ "List", "team", "restrictions", "of", "protected", "branch", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Repository/Protection.php#L319-L322
train
KnpLabs/php-github-api
lib/Github/Api/Repository/Protection.php
Protection.replaceTeamRestrictions
public function replaceTeamRestrictions($username, $repository, $branch, array $params = []) { return $this->put('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/branches/'.rawurlencode($branch).'/protection/restrictions/teams', $params); }
php
public function replaceTeamRestrictions($username, $repository, $branch, array $params = []) { return $this->put('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/branches/'.rawurlencode($branch).'/protection/restrictions/teams', $params); }
[ "public", "function", "replaceTeamRestrictions", "(", "$", "username", ",", "$", "repository", ",", "$", "branch", ",", "array", "$", "params", "=", "[", "]", ")", "{", "return", "$", "this", "->", "put", "(", "'/repos/'", ".", "rawurlencode", "(", "$", ...
Replace team restrictions of protected branch. @link https://developer.github.com/v3/repos/branches/#replace-team-restrictions-of-protected-branch @param string $username The user who owns the repository @param string $repository The name of the repo @param string $branch The name of the branch @param array $p...
[ "Replace", "team", "restrictions", "of", "protected", "branch", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Repository/Protection.php#L336-L339
train
KnpLabs/php-github-api
lib/Github/Api/Repository/Protection.php
Protection.addTeamRestrictions
public function addTeamRestrictions($username, $repository, $branch, array $params = []) { return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/branches/'.rawurlencode($branch).'/protection/restrictions/teams', $params); }
php
public function addTeamRestrictions($username, $repository, $branch, array $params = []) { return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/branches/'.rawurlencode($branch).'/protection/restrictions/teams', $params); }
[ "public", "function", "addTeamRestrictions", "(", "$", "username", ",", "$", "repository", ",", "$", "branch", ",", "array", "$", "params", "=", "[", "]", ")", "{", "return", "$", "this", "->", "post", "(", "'/repos/'", ".", "rawurlencode", "(", "$", "...
Add team restrictions of protected branch. @link https://developer.github.com/v3/repos/branches/#add-team-restrictions-of-protected-branch @param string $username The user who owns the repository @param string $repository The name of the repo @param string $branch The name of the branch @param array $params ...
[ "Add", "team", "restrictions", "of", "protected", "branch", "." ]
275ce096aaadf274905e085f103e9c1ea476de82
https://github.com/KnpLabs/php-github-api/blob/275ce096aaadf274905e085f103e9c1ea476de82/lib/Github/Api/Repository/Protection.php#L353-L356
train