Return the tag's name (or id number) for this task.

        :returns: An int (tag id) or string (tag name, eg "foo-build").
                  This seems to depend on the task method. For example,
                  buildArch, tagBuild, and tagNotification tasks always return
                  a tag ID here.
                  If you do get an int back here, you'll have to make a
                  separate getTag RPC to get the tag's name.

def tag(self):
        """
        Return the tag's name (or id number) for this task.

        :returns: An int (tag id) or string (tag name, eg "foo-build").
                  This seems to depend on the task method. For example,
                  buildArch, tagBuild, and tagNotification tasks always return
                  a tag ID here.
                  If you do get an int back here, you'll have to make a
                  separate getTag RPC to get the tag's name.
        """
        if self.method == 'buildArch':
            # Note: buildArch tag will be an int here.
            return self.params[1]
        if self.method in ('createdistrepo', 'distRepo', 'newRepo', 'runroot',
                           'tagBuild', 'waitrepo'):
            return self.params[0]
        if self.method == 'tagNotification':
            return self.params[2]
        if self.method == 'buildMaven':
            return self.params[1]['name']