@param $prev_tag
@param $tag
@param $github_token

@return string
490909
protected function generateReleaseNotes($prev_tag, $tag, $github_token) {
    $log = $this->getChangesOnBranchSinceTag($prev_tag);
    $changes = $this->sortChanges($log, $github_token);

    $text = '';
    $text .= "[Full Changelog](https://github.com/acquia/blt/compare/$prev_tag...$tag)\n\n";
    if (!empty($changes['breaking'])) {
      $text .= "**Major / breaking changes**\n\n";
      $text .= $this->processReleaseNotesSection($changes['breaking']);
    }
    if (!empty($changes['enhancements'])) {
      $text .= "\n**Implemented enhancements**\n\n";
      $text .= $this->processReleaseNotesSection($changes['enhancements']);
    }
    if (!empty($changes['bugs'])) {
      $text .= "\n**Fixed bugs**\n\n";
      $text .= $this->processReleaseNotesSection($changes['bugs']);
    }
    if (!empty($changes['misc'])) {
      $text .= "\n**Miscellaneous**\n\n";
      $text .= $this->processReleaseNotesSection($changes['misc']);
    }

    return $text;
  }
268983
function gitRelease() {
			// Tag release
			rbot.log.info('Tagging release ' + commit.versionTag + ' via ' + options.gitHostname);
			cmd('git tag -f -a ' + commit.versionTag + ' -m "'
					+ (chgLogRtn ? chgLogRtn.replace(coopt.regexLines, '$1 \\') : commit.message) + '"');
			cmd('git push -f ' + options.repoName + ' ' + commit.versionTag);
			commit.releaseId = commit.versionTag;
			// TODO : upload asset?
			rollCall.addRollback(rollbackTag);
			rollCall.then(publish);
		}
740977
function find_ancestor_tag($tag)
    {
        global $debugObject;
        if (is_object($debugObject)) { $debugObject->debugLogEntry(1); }

        // Start by including ourselves in the comparison.
        $returnDom = $this;

        while (!is_null($returnDom))
        {
            if (is_object($debugObject)) { $debugObject->debugLog(2, "Current tag is: " . $returnDom->tag); }

            if ($returnDom->tag == $tag)
            {
                break;
            }
            $returnDom = $returnDom->parent;
        }
        return $returnDom;
    }
1308559
private function getFieldIndex($prevTag, $tag, $fieldIndex)
    {
        if ($prevTag == $tag or '' == $prevTag) {
            return $fieldIndex; // iteration of field index will continue
        }
        $specTag = $this->currentSpec['field']->getTag();
        if (preg_match('/'.$specTag.'/', $tag)) {
            // not same field tag, but field spec tag matches
            return $fieldIndex; // iteration of field index will continue
        }
        // not same field tag, iteration gets reset
        return $this->spec['field']->getIndexStart();
    }
1335774
def start_of_chunk(prev_tag, tag, prev_type, type_):
    
    chunk_start = False

    if tag == 'B': chunk_start = True
    if tag == 'S': chunk_start = True

    if prev_tag == 'E' and tag == 'E': chunk_start = True
    if prev_tag == 'E' and tag == 'I': chunk_start = True
    if prev_tag == 'S' and tag == 'E': chunk_start = True
    if prev_tag == 'S' and tag == 'I': chunk_start = True
    if prev_tag == 'O' and tag == 'E': chunk_start = True
    if prev_tag == 'O' and tag == 'I': chunk_start = True

    if tag != 'O' and tag != '.' and prev_type != type_:
        chunk_start = True

    return chunk_start
978686
def tag(self, tagname, message=None, force=True):
        """"""
        return git_tag(self.repo_dir, tagname, message=message, force=force)
102794
function handleTag_pre() {
    if ($this->keepHTML && $this->parser->isStartTag) {
      # check if a simple <code> follows
      if (!preg_match('#^\s*<code\s*>#Us', $this->parser->html)) {
        # this is no standard markdown code block
        $this->handleTagToText();
        return;
      }
    }
    $this->indent('    ');
    if (!$this->parser->isStartTag) {
      $this->setLineBreaks(2);
    } else {
      $this->parser->html = ltrim($this->parser->html);
    }
  }
105586
static int prec(TokenKind token) {
        JCTree.Tag oc = optag(token);
        return (oc != NO_TAG) ? TreeInfo.opPrec(oc) : -1;
    }
788452
public function getTagCommit(Tag $tag)
    {
        $this->clearAll();
        $this->addCommandName(static::GIT_REVLIST);
        // only the last commit
        $this->addCommandArgument('-n1');
        $this->addCommandSubject($tag->getFullRef());

        return $this->getCommand();
    }
754201
protected function preRenderLocalized(RequireTagInterface $tag)
    {
        $output = '';

        foreach ($this->getLocalizedAssets($tag->getPath()) as $localeAsset) {
            $output .= $this->doRender($tag, $localeAsset);
        }

        return $output;
    }
512639
function tagMatcher($tag_name, $close_tags = null)
    {
        $expr = $this->_tag_expr;

        if ($close_tags) {
            $options = implode("|", array_merge(array($tag_name), $close_tags));
            $closer = sprintf("(?:%s)", $options);
        } else {
            $closer = $tag_name;
        }

        $expr = sprintf($expr, $tag_name, $closer);
        return sprintf("/%s/%s", $expr, $this->_re_flags);
    }
970552
async function getTagCommit(githubRepo, tag) {
  const cachedResult = await renovateCache.get(
    cacheNamespace,
    getCacheKey(githubRepo, `tag-${tag}`)
  );
  // istanbul ignore if
  if (cachedResult) {
    return cachedResult;
  }
  let digest;
  try {
    const url = `https://api.github.com/repos/${githubRepo}/git/refs/tags/${tag}`;
    digest = (await ghGot(url)).body.object.sha;
  } catch (err) {
    logger.info(
      { githubRepo, err },
      'Error getting tag commit from GitHub repo'
    );
  }
  if (!digest) {
    return null;
  }
  const cacheMinutes = 120;
  await renovateCache.set(
    cacheNamespace,
    getCacheKey(githubRepo, `tag-${tag}`),
    digest,
    cacheMinutes
  );
  return digest;
}
92406
public function buildPreselectedTagsAgainst(array &$tagsAgainst)
    {
        $tagChar = $this->pObj->extConf['prePostTagChar'];
        foreach ($this->pObj->preselectedFilter as $key => $filterTags) {
            // add it only, if no other filter options of this filter has been
            // selected in the frontend
            if (!isset($this->pObj->piVars['filter'][$key]) && !is_array($this->pObj->piVars['filter'][$key])) {
                // Quote the tags for use in database query
                $queryBuilder = Db::getQueryBuilder('tx_kesearch_index');
                foreach ($filterTags as $k => $v) {
                    $filterTags[$k] = $queryBuilder->quote($v);
                }
                // if we are in checkbox mode
                if (count($this->pObj->preselectedFilter[$key]) >= 2) {
                    $tagsAgainst[$key] .= ' "'
                        . $tagChar
                        . implode($tagChar . '" "' . $tagChar, $filterTags)
                        . $tagChar
                        . '"';
                    // if we are in select or list mode
                } elseif (count($this->pObj->preselectedFilter[$key]) == 1) {
                    $tagsAgainst[$key] .= ' +"' . $tagChar . array_shift($filterTags) . $tagChar . '"';
                }
            }
        }
    }
1051134
function startTagBeforeHtml(p, token) {
    if (token.tagName === $.HTML) {
        p._insertElement(token, NS.HTML);
        p.insertionMode = BEFORE_HEAD_MODE;
    }

    else
        tokenBeforeHtml(p, token);
}
753167
protected function parse_tags( $response, $repo_type ) {
		$tags     = [];
		$rollback = [];

		foreach ( (array) $response as $tag ) {
			$download_base    = "{$repo_type['base_uri']}/latest/{$this->type->owner}/repos/{$this->type->slug}/archive";
			$download_base    = $this->add_endpoints( $this, $download_base );
			$tags[]           = $tag;
			$rollback[ $tag ] = add_query_arg( 'at', $tag, $download_base );
		}

		return [ $tags, $rollback ];
	}
257014
public function text($type, $tag)
    {
        $this->deprecate('text');
        if (isset($this->text[$type]))
            return $this->text[$type]->get($tag);

        return null;
    }
711498
public function tag($tag)
    {
        $this->sys->exec(sprintf('git tag %s', $tag), 'Unable to create tag');
        $this->sys->exec('git push --tags', 'Unable to push tags');

        return $this;
    }