Skip to content

Commit

Permalink
allow git username to have capitals (grafana#516)
Browse files Browse the repository at this point in the history
  • Loading branch information
briangann committed Nov 14, 2019
1 parent f121752 commit fba0770
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/lintPlugin.js
Expand Up @@ -3,7 +3,7 @@ const semver = require('semver');
const { fetchPluginJson } = require('./github/github');

const PLUGIN_TYPES = ['datasource', 'panel', 'app', 'renderer'];
const PLUGIN_ID_PATTERN = new RegExp(`^[A-Za-z0-9]+(-[A-Za-z0-9]+)*-(${PLUGIN_TYPES.join('|')})$`);
const PLUGIN_ID_PATTERN = new RegExp(`^[A-Za-z0-9]+(-[a-z0-9]+)*-(${PLUGIN_TYPES.join('|')})$`);

async function lintPlugin(url, commit, version, pluginId) {
const postData = {
Expand Down Expand Up @@ -142,7 +142,7 @@ async function getOrg(orgSlug) {
}

function getOrgSlug(pluginId) {
const result = /^([a-z0-9]+)(-[a-z0-9]+)*-(datasource|app|panel)$/.exec(pluginId);
const result = /^([A-Za-z0-9]+)(-[a-z0-9]+)*-(datasource|app|panel)$/.exec(pluginId);
if (result && result.length > 1) {
return result[1];
}
Expand Down

0 comments on commit fba0770

Please sign in to comment.