// Path: github-pullrequest-plugin/src/main/java/com/github/kostyasha/github/integration/multibranch/head/GitHubTagSCMHead.java
// public class GitHubTagSCMHead extends GitHubSCMHead<GitHubTagCause> {
//     private static final long serialVersionUID = 1L;
// 
//     public GitHubTagSCMHead(@NonNull String name, String sourceId) {
//         super(name, sourceId);
//     }
// 
//     @Override
//     public String getPronoun() {
//         return "Tag " + getName();
//     }
// 
//     @Override
//     public String fetchHeadSha(GHRepository remoteRepo) throws IOException {
//         GHTag tag = GitHubTag.findRemoteTag(remoteRepo, getName());
//         if (tag == null) {
//             throw new IOException("No tag " + getName() + " in " + remoteRepo.getFullName());
//         }
//         return tag.getCommit().getSHA1();
//     }
// 
//     public String getHeadSha(GitHubTagCause cause) {
//         return cause.getCommitSha();
//     }
// }


import com.github.kostyasha.github.integration.multibranch.head.GitHubTagSCMHead;
import jenkins.scm.api.SCMHead;
import jenkins.util.NonLocalizable;
import org.jvnet.localizer.Localizable;
import edu.umd.cs.findbugs.annotations.NonNull;
package com.github.kostyasha.github.integration.multibranch.category;



public class GitHubTagSCMHeadCategory extends GitHubSCMHeadCategory {
    public static final GitHubTagSCMHeadCategory TAG = new GitHubTagSCMHeadCategory("tag", new NonLocalizable("Tags"));

    public GitHubTagSCMHeadCategory(@NonNull String name, Localizable displayName) {
        super(name, displayName);
    }

    @NonNull
    @Override
    protected Localizable defaultDisplayName() {
        return new NonLocalizable("Tag");
    }

    @Override
    public boolean isMatch(@NonNull SCMHead instance) {
// Path: github-pullrequest-plugin/src/main/java/com/github/kostyasha/github/integration/multibranch/head/GitHubTagSCMHead.java
// public class GitHubTagSCMHead extends GitHubSCMHead<GitHubTagCause> {
//     private static final long serialVersionUID = 1L;
// 
//     public GitHubTagSCMHead(@NonNull String name, String sourceId) {
//         super(name, sourceId);
//     }
// 
//     @Override
//     public String getPronoun() {
//         return "Tag " + getName();
//     }
// 
//     @Override
//     public String fetchHeadSha(GHRepository remoteRepo) throws IOException {
//         GHTag tag = GitHubTag.findRemoteTag(remoteRepo, getName());
//         if (tag == null) {
//             throw new IOException("No tag " + getName() + " in " + remoteRepo.getFullName());
//         }
//         return tag.getCommit().getSHA1();
//     }
// 
//     public String getHeadSha(GitHubTagCause cause) {
//         return cause.getCommitSha();
//     }
// }


// Path: github-pullrequest-plugin/src/main/java/com/github/kostyasha/github/integration/multibranch/category/GitHubTagSCMHeadCategory.java
import com.github.kostyasha.github.integration.multibranch.head.GitHubTagSCMHead;
import jenkins.scm.api.SCMHead;
import jenkins.util.NonLocalizable;
import org.jvnet.localizer.Localizable;
import edu.umd.cs.findbugs.annotations.NonNull;

package com.github.kostyasha.github.integration.multibranch.category;



public class GitHubTagSCMHeadCategory extends GitHubSCMHeadCategory {
    public static final GitHubTagSCMHeadCategory TAG = new GitHubTagSCMHeadCategory("tag", new NonLocalizable("Tags"));

    public GitHubTagSCMHeadCategory(@NonNull String name, Localizable displayName) {
        super(name, displayName);
    }

    @NonNull
    @Override
    protected Localizable defaultDisplayName() {
        return new NonLocalizable("Tag");
    }

    @Override
    public boolean isMatch(@NonNull SCMHead instance) {
        return instance instanceof GitHubTagSCMHead;