Skip to content

Commit ab7729a

Browse files
committed
Fetch scripts from the main branch of the catalog
The jenkinsci/jenkins-scripts repository is switching from `master` as its default branch to `main`. Update references to the repository to use this new branch name.
1 parent 28b28ff commit ab7729a

File tree

5 files changed

+10
-8
lines changed

5 files changed

+10
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Release date: _Nov 7, 2012_
9797
Would like to create/use a central "catalog" . . . 
9898
- Scriptler now understands the format for shared scripts also when
9999
first time pushed via git into Scriptler (Format description:
100-
<https://github.com/jenkinsci/jenkins-scripts/tree/master/scriptler#scriptler-scripts>
100+
<https://github.com/jenkinsci/jenkins-scripts/tree/main/scriptler#scriptler-scripts>
101101
)
102102
- now depends on the [Git Server
103103
Plugin](https://wiki.jenkins.io/display/JENKINS/Git+Server+Plugin)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Besides administering your scripts, Scriptler also provides a way to
77
share scripts between users via hosted script catalogs on the
88
internet.
99
On GitHub at
10-
<https://github.com/jenkinsci/jenkins-scripts/tree/master/scriptler> you
10+
<https://github.com/jenkinsci/jenkins-scripts/tree/main/scriptler> you
1111
are not only able to find scripts and import it via scriptler in to your
1212
Jenkins instance, but can also share your own scripts. Just send a pull
1313
request to <https://github.com/jenkinsci/jenkins-scripts/> and your

src/main/java/org/jenkinsci/plugins/scriptler/share/gh/CentralScriptJsonCatalog.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
import org.jenkinsci.plugins.scriptler.share.ScriptInfo;
1313

1414
/**
15-
* Gets the GitHub catalog from <a href="http://mirrors.jenkins-ci.org/updates/updates/org.jenkinsci.plugins.scriptler.CentralScriptJsonCatalog.json">jenkins-ci/org.jenkinsci.plugins.scriptler.CentralScriptJsonCatalog.json</a>. This catalog is updated by a background crawler on the
16-
* Jenkins infrastructure site.
15+
* Gets the GitHub catalog from <a href="https://mirrors.updates.jenkins.io/updates/org.jenkinsci.plugins.scriptler.CentralScriptJsonCatalog.json">jenkins.io/org.jenkinsci.plugins.scriptler.CentralScriptJsonCatalog.json</a>.
16+
* This catalog is updated by <a href="https://github.com/jenkins-infra/crawler/blob/main/scriptler.groovy">a background crawler on the Jenkins infrastructure site</a>.
1717
*
1818
* @author Dominik Bartholdi (imod)
1919
*/

src/main/java/org/jenkinsci/plugins/scriptler/share/gh/GHCatalog.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,10 @@ public class GHCatalog implements ScriptInfoCatalog<ScriptInfo> {
3131

3232
private static final Logger LOGGER = Logger.getLogger(GHCatalog.class.getName());
3333

34-
public static final String REPO_BASE = "https://github.com/jenkinsci/jenkins-scripts/blob/master/scriptler/{1}";
35-
public static final String DOWNLOAD_URL = "https://raw.github.com/jenkinsci/jenkins-scripts/master/scriptler/{1}";
34+
private static final String REPO = "jenkinsci/jenkins-scripts";
35+
private static final String BRANCH = "main";
36+
public static final String REPO_BASE = "https://github.com/" + REPO + "/blob/" + BRANCH + "/scriptler/{1}";
37+
public static final String DOWNLOAD_URL = "https://raw.github.com/" + REPO + "/" + BRANCH + "/scriptler/{1}";
3638

3739
public static final CatalogInfo CATALOG_INFO = new CatalogInfo("gh", REPO_BASE, REPO_BASE, DOWNLOAD_URL);
3840

src/main/java/org/jenkinsci/plugins/scriptler/util/ScriptHelper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,12 +186,12 @@ public static String runScript(String node, String scriptTxt, @NonNull Collectio
186186
}
187187

188188
/**
189-
* Returns the meta info of a script body, which must follow <a href="https://github.com/jenkinsci/jenkins-scripts/tree/master/scriptler">the convention</a>
189+
* Returns the meta info of a script body, which must follow <a href="https://github.com/jenkinsci/jenkins-scripts/tree/main/scriptler">the convention</a>
190190
*
191191
* @param fullScriptBody
192192
* the script to extract the meta info from
193193
* @return <code>null</code> if no meta info found
194-
* @see <a href="https://github.com/jenkinsci/jenkins-scripts/tree/master/scriptler">...</a>
194+
* @see <a href="https://github.com/jenkinsci/jenkins-scripts/tree/main/scriptler">...</a>
195195
*/
196196
public static ScriptInfo extractScriptInfo(String fullScriptBody) {
197197
final Matcher matcher = SCRIPT_META_PATTERN.matcher(fullScriptBody);

0 commit comments

Comments
 (0)