Get all the repository tags.

@param {Object} [execaOpts] Options to pass to `execa`.

@return {Array<String>} List of git tags.
@throws {Error} If the `git` command fails.
3292
async function getTags(execaOpts) {
  return (await execa.stdout('git', ['tag'], execaOpts))
    .split('\n')
    .map(tag => tag.trim())
    .filter(Boolean);
}
1012981
function gitTag () {
      // If the tag exists, skip tagging
      if (shelljs.exec('git ls-remote --tags --exit-code ' + remoteName + ' ' + options.tag, {silent: true}).code === 0) {
        log.subhead('The tag "' + options.tag + '" already exists on remote. Skipping tagging.');
        return;
      }

      log.subhead('Tagging the local repository with ' + options.tag);
      execWrap('git tag ' + options.tag);
    }
351661
function parseTags(tags) {
    if (tags.length > 0 && util.isArray(tags[0])) {
        tags = tags[0];
    }

    return tags;
}
116665
def get_tags(self):
        
        return github.PaginatedList.PaginatedList(
            github.Tag.Tag,
            self._requester,
            self.url + "/tags",
            None
        )
594011
function tag() {
  var v = 'v' + pkg.version;
  var message = 'Release ' + v;

  return gulp.src(["./package.json", "./bower.json"])
    .pipe(git.commit(message))
    .pipe(git.tag(v, message))
    ;
    // .pipe(git.push(remote, branch, {args: '--tags'}))
}
433675
function checkOutTag(repo, tag) {
  return git.Reference.dwim(repo, 'refs/tags/' + tag)
    .then(function(ref) {
      return ref.peel(git.Object.TYPE.COMMIT);
    })
    .then(function(ref) {
      return repo.getCommit(ref);
    })
    .then(function(commit) {
      return git.Checkout.tree(repo, commit, {
        checkoutStrategy: git.Checkout.STRATEGY.FORCE
      }).then(function() {
        return repo.setHeadDetached(commit, repo.defaultSignature, 'Checkout: HEAD ' + commit.id());
      });
    });
}
469927
function gitTags(wd) {
  const basename = path.basename(wd);
  const keys = ['tag_name', 'datetime_created'];
  const separator = '_,,,_';
  const cmd = `git for-each-ref --format='%(refname:short)${separator}%(taggerdate)' refs/tags`;

  console.log(`Collecting git tags of repo ${chalk.cyan(basename)}`);
  const gitProcess = exec(cmd, {
    cwd: wd
  });
  const rl = readline.createInterface({
    input: gitProcess.stdout
  });

  const tagStats = [];
  return new Promise((resolve, reject) => {
    gitProcess.on('error', (err) => {
      reject(err);
    });

    rl.on('line', (line) => {
      const entry = line.split(separator);
      tagStats.push({
        tag_name: entry[0],
        datetime_created: new Date(entry[1]).toISOString()
      });
    }).on('close', () => {
      if (tagStats.length === 0) {
        reject(new Error(chalk.red(`No tags added to this repo`)));
      }
      resolve(tagStats);
    });

  });
}
1008570
protected function parse_tags( $response, $repo_type ) {
		$tags     = [];
		$rollback = [];

		foreach ( (array) $response as $tag ) {
			$download_link    = "/projects/{$this->get_gitlab_id()}/repository/archive.zip";
			$download_link    = $this->get_api_url( $download_link );
			$download_link    = add_query_arg( 'sha', $tag, $download_link );
			$tags[]           = $tag;
			$rollback[ $tag ] = $download_link;
		}

		return [ $tags, $rollback ];
	}
449057
public function get_remote_api_tag( $git, $request ) {
		$repo_type = $this->return_repo_type();
		$response  = isset( $this->response['tags'] ) ? $this->response['tags'] : false;

		if ( ! $response ) {
			self::$method = 'tags';
			$response     = $this->api( $request );

			if ( ! $response ) {
				$response          = new \stdClass();
				$response->message = 'No tags found';
			}

			if ( $response ) {
				$response = $this->parse_tag_response( $response );
				$this->set_repo_cache( 'tags', $response );
			}
		}

		if ( $this->validate_response( $response ) ) {
			return false;
		}

		$tags = $this->parse_tags( $response, $repo_type );
		$this->sort_tags( $tags );

		return true;
	}
1155236
def tags(self):
        """"""
        return [(r['name'], self.vpathto(r['name'])) for r in self.remotes if r['kind'] == 'tags']
484883
function getOptions(opts) {
  var options = {};
  for (var opt in defaultOptions) {
    options[opt] = opts && _util.has(opts, opt) ? opts[opt] : defaultOptions[opt];
  }if (options.allowReserved == null) options.allowReserved = options.ecmaVersion < 5;

  if (_util.isArray(options.onToken)) {
    (function () {
      var tokens = options.onToken;
      options.onToken = function (token) {
        return tokens.push(token);
      };
    })();
  }
  if (_util.isArray(options.onComment)) options.onComment = pushComment(options, options.onComment);

  return options;
}
515021
function getTags (posts) {
  var tags = posts.reduce(function (tags, post) {
    if (!post.tags || !Array.isArray(post.tags)) return tags;
    return tags.concat(post.tags);
  }, []);

  return _.unique(tags).sort();
}
1105550
function() {
    var highestTag = '0.0.0';
    var tags = exec('git tag');

    if (tags.code !== 0) return highestTag;

    tags = tags.output.split('\n');
    tags.forEach(function(tag) {
      tag = semver.valid(tag);
      if (tag && (!highestTag || semver.gt(tag, highestTag))) {
        highestTag = tag;
      }
    });

    return highestTag;
  }
4290
def tag(self):
        '''
        
        '''

        tag = self.m(
            'getting git tags',
            cmdd=dict(
                cmd='git tag -l --sort="version:refname"',
                cwd=self.local
            ),
            verbose=False,
        )
        if tag.get('returncode') == 0:
            return tag.get('stdout')
946190
function githubRepo (options) {
  try {
    const url = options.data.root.package.repository.url
    const match = url.match(/.*?(:\/\/|@)github\.com[/:](.*?)(#.*?)?$/)
    if (match) {
      return match[2].replace(/\.git$/, '')
    } else {
      return null
    }
  } catch (e) {
    // No repositor-url exists
    return null
  }
}
762234
function tagRepo(version) {
    if (SHOULD_PUBLISH) {
        shell.exec(`git tag ${version}`);
        shell.exec("git push origin --tags");
    } else {
        console.log(`\n\nWould publish git tag as version ${version}.`);
    }
}
709579
def _get_tag(repo, name):
    '''
    
    '''
    try:
        return [x for x in _all_tags(repo) if x[0] == name][0]
    except IndexError:
        return False