Hook into site_transient_update_themes to update.
Finds newest tag and compares to current tag.

@param array $transient

@return array|\stdClass
764010
public function update_site_transient( $transient ) {
		foreach ( (array) $this->config as $theme ) {
			if ( $this->can_update_repo( $theme ) ) {
				$response = [
					'theme'       => $theme->slug,
					'new_version' => $theme->remote_version,
					'url'         => $theme->uri,
					'package'     => $theme->download_link,
					'branch'      => $theme->branch,
					'branches'    => array_keys( $theme->branches ),
					'type'        => "{$theme->git}-{$theme->type}",
				];

				// Skip on RESTful updating.
				if ( isset( $_GET['action'], $_GET['theme'] ) &&
					'github-updater-update' === $_GET['action'] &&
					$response['theme'] === $_GET['theme']
				) {
					continue;
				}

				// Pull update from dot org if not overriding.
				if ( ! $this->override_dot_org( 'theme', $theme ) ) {
					continue;
				}

				$transient->response[ $theme->slug ] = $response;
			} else {
				/**
				 * Filter to return array of overrides to dot org.
				 *
				 * @since 8.5.0
				 * @return array
				 */
				$overrides = apply_filters( 'github_updater_override_dot_org', [] );
				if ( isset( $transient->response[ $theme->slug ] ) && in_array( $theme->slug, $overrides, true ) ) {
					unset( $transient->response[ $theme->slug ] );
				}
			}

			// Set transient for rollback.
			if ( isset( $_GET['theme'], $_GET['rollback'] ) && $theme->slug === $_GET['theme']
			) {
				$transient->response[ $theme->slug ] = $this->set_rollback_transient( 'theme', $theme );
			}
		}

		return $transient;
	}
832012
protected function update(array $lastSearchesRow)
    {
        $queryBuilder = $this->getQueryBuilder();

        $affectedRows = $queryBuilder
            ->update($this->table)
            ->where(
                $queryBuilder->expr()->eq('sequence_id', $queryBuilder->createNamedParameter($lastSearchesRow['sequence_id']))
            )
            ->set('tstamp', time())
            ->set('keywords', $lastSearchesRow['keywords'])
            ->execute();

        if ($affectedRows < 1) {
            throw new \InvalidArgumentException(vsprintf('By trying to update last searches row with values "%s" nothing was updated, make sure the given "sequence_id" exists in database.', [\json_encode($lastSearchesRow)]), 1502717923);
        }
    }
1023501
public function invalidateTags(array $tags)
    {
        if (!$this->cache instanceof TagAwareAdapterInterface) {
            throw new \RuntimeException('Cannot invalidate tags on a cache
            implementation that does not implement the TagAwareAdapterInterface.');
        }

        try {
            return $this->cache->invalidateTags($tags);
        } catch (InvalidArgumentException $e) {
            return false;
        }
    }
631532
protected function perform_update_metadata( array $changes ) {
		if ( ! $this->meta_type ) {
			return;
		}

		$mapping = $this->get_mapping();

		$changes = $this->recently_created
			? array_keys( $mapping )
			: $this->get_changes_only( $changes, array_keys( $mapping ) );

		// Don't do anything if nothing changes.
		if ( empty( $changes ) ) {
			return;
		}

		$updated = [];
		foreach ( $changes as $attribute ) {
			$meta_key = $this->get_mapping_metakey( $attribute );
			if ( is_null( $meta_key ) ) {
				continue;
			}

			if ( $this->update_meta( $meta_key, $this->get_attribute( $attribute ) ) ) {
				$updated[] = $attribute;
			}
		}

		return $updated;
	}
806908
function theme_update_transient( $value ) {
		$update_data = $this->check_for_update();
		if ( $update_data ) {
			$value->response[ $this->product->get_slug() ] = $update_data;
		}

		return $value;
	}
198645
public static function updateClasses(Tag &$Tag)
    {
        if (empty($Tag->classes) && isset($Tag->attributes['class'])) {
            $classes = explode(' ', $Tag->attributes['class']);
        } elseif (!empty($Tag->classes)) {
            $classes = $Tag->classes;
        }

        if (isset($classes)) {
            sort($classes);
            $Tag->classes = $classes;
            $Tag->attributes['class'] = implode(' ', $classes);
        }
    }
266845
public function apply(array $options = [])
    {
        $data = [
            'body' => [
                'properties' => $this->mapping
            ]
        ];

        $this->collection->getKuzzle()->query(
            $this->collection->buildQueryArgs('collection', 'updateMapping'),
            $this->collection->getKuzzle()->addHeaders($data, $this->headers),
            $options
        );

        return $this->refresh($options);
    }
205835
public function update( $table )
    {
        $table = $this->getIdentifier( $table );
        $table = $this->getPrefixedTableNames($table);
        $this->table = $table;
        return $this;
    }
1011135
protected function updateTags($entry)
    {
        if (! empty($entry->tagsChanges['added'])) {
            $this->table('telescope_entries_tags')->insert(
                collect($entry->tagsChanges['added'])->map(function ($tag) use ($entry) {
                    return [
                        'entry_uuid' => $entry->uuid,
                        'tag' => $tag,
                    ];
                })->toArray()
            );
        }

        collect($entry->tagsChanges['removed'])->each(function ($tag) use ($entry) {
            $this->table('telescope_entries_tags')->where([
                'entry_uuid' => $entry->uuid,
                'tag' => $tag,
            ])->delete();
        });
    }
769238
private function syncUpdated(array $updated)
    {
        foreach ($updated as $key => $value) {
            $this->newQuery()
                 ->where($this->keyColumn, '=', $key)
                 ->update([$this->valueColumn => $value]);
        }
    }
136213
public function set_update_transients() {
		if ( empty( self::$options_remote ) ) {
			return;
		}
		$plugin = Singleton::get_instance( 'Plugin', $this );
		$theme  = Singleton::get_instance( 'Theme', $this );

		add_filter( 'github_updater_add_admin_pages', [ $this, 'extra_admin_pages' ] );
		add_filter( 'site_transient_update_plugins', [ $plugin, 'update_site_transient' ], 10, 1 );
		add_filter( 'site_transient_update_themes', [ $theme, 'update_site_transient' ], 10, 1 );

		$plugin->get_meta_plugins();
		$theme->get_meta_themes();

		$current_plugins = get_site_transient( 'update_plugins' );
		$current_themes  = get_site_transient( 'update_themes' );
		set_site_transient( 'update_plugins', $current_plugins );
		set_site_transient( 'update_themes', $current_themes );

		remove_filter( 'github_updater_add_admin_pages', [ $this, 'extra_admin_pages' ] );
	}
55731
public function publishedTags($publishedTags = [])
    {
        if (count($publishedTags) <= 0) {
            return $this->publishedTags;
        }

        $this->publishedTags = $publishedTags;
        return $this;
    }
1309851
protected function set_rollback_transient( $type, $repo, $set_transient = false ) {
		$repo_api      = Singleton::get_instance( 'API', $this )->get_repo_api( $repo->git, $repo );
		$this->tag     = isset( $_GET['rollback'] ) ? $_GET['rollback'] : false;
		$slug          = 'plugin' === $type ? $repo->file : $repo->slug;
		$download_link = $repo_api->construct_download_link( $this->tag );

		/**
		 * Filter download link so developers can point to specific ZipFile
		 * to use as a download link during a branch switch.
		 *
		 * @since 8.6.0
		 *
		 * @param string    $download_link Download URL.
		 * @param /stdClass $repo
		 * @param string    $this->tag     Branch or tag for rollback.
		 */
		$download_link = apply_filters_deprecated(
			'github_updater_set_rollback_package',
			[ $download_link, $repo, $this->tag ],
			'8.8.0',
			'github_updater_post_construct_download_link'
		);

		$rollback = [
			$type         => $slug,
			'new_version' => $this->tag,
			'url'         => $repo->uri,
			'package'     => $download_link,
			'branch'      => $repo->branch,
			'branches'    => $repo->branches,
			'type'        => $repo->type,
		];

		if ( 'plugin' === $type ) {
			$rollback['slug'] = $repo->slug;
			$rollback         = (object) $rollback;
		}

		return $rollback;
	}
1313107
public static function update_template($template) {

        $params = self::validate_parameters(self::update_template_parameters(), array('template' => $template));
        $params = $params['template'];
        $template = api::read_template($params['id']);
        self::validate_context($template->get_context());

        $params = (object) $params;

        return api::update_template($params);
    }
1205161
public function UpdateTags()
    {
        $siteTree = DataObject::getSchema()->tableName(SiteTree::class);
        $taxonomy = DataObject::getSchema()->tableName(TaxonomyTerm::class);

        $tags = TaxonomyTerm::get()
            ->innerJoin('BasePage_Terms', sprintf('"%s"."ID"="BasePage_Terms"."TaxonomyTermID"', $taxonomy))
            ->innerJoin(
                $siteTree,
                sprintf(
                    '"%s"."ID" = "BasePage_Terms"."BasePageID" AND "%s"."ParentID" = \'%d\'',
                    $siteTree,
                    $siteTree,
                    $this->ID
                )
            )
            ->sort('Name');

        return $tags;
    }
495515
public function update(array $attributes = [])
    {
        if (isset($attributes['password'])) {
            $attributes['password'] = bcrypt($attributes['password']);
        }

        if (!parent::update($attributes)) {
            throw new Exception('Cannot update user.'); // @codeCoverageIgnore
        }
        if (!parent::update($attributes)) {
            throw new Exception('Cannot update user.'); // @codeCoverageIgnore
        }

        return $this->fresh();
    }
615516
public function getNextTag($prefix = null)
    {
        $existingTags = $this->listPrefixedTags($prefix);

        $lastTag = array_pop($existingTags);

        if (0 >= preg_match('/^[0-9]+\.[0-9]+\.[0-9]+$/', $lastTag, $matches)) {
            throw new \RuntimeException(sprintf("Unable to parse latest tag, expected pattern X.X.X, found: %s", $lastTag), 22);
        }

        list ($major, $minor, $release) = explode('.', $lastTag, 3);

        return sprintf('%s.%s.%s', $major, $minor, (((int) $release) + 1));
    }