Sha256: 26de82c01a66fb1c21a162d5618fe70c2631175de5eb0237655646a4575b5db0
Contents?: true
Size: 520 Bytes
Versions: 10
Compression:
Stored size: 520 Bytes
Contents
# frozen_string_literal: true module Github def labels @github_labels ||= github.api.labels(repo_name) end def repo_name github.pr_json['base']['repo']['full_name'] end def pr_number github.pr_json['number'] end def add_labels(*new_labels) existing = labels.map(&:name) new_labels.reject { |l| existing.include?(l) }.each do |to_create| github.api.add_label(repo_name, to_create) end github.api.add_labels_to_an_issue(repo_name, pr_number, new_labels) end end
Version data entries
10 entries across 10 versions & 1 rubygems