Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request #19 from Sibz/Sibz-patch-2
Browse files Browse the repository at this point in the history
fix: support github username regex
  • Loading branch information
Sibz authored Mar 2, 2021
2 parents 8c04f1e + 318b1c1 commit e92e907
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/makeStatusRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export type StatusRequest = RequestParameters & Pick<any, "owner" | "repo" | "st
export const ERR_INVALID_OWNER = "Input 'owner' must be a valid GitHub username";
export const ERR_INVALID_STATE = "Input 'state' must be one of success | error | failure | pending";

const regExUsername = /^\w+-?\w+(?!-)$/;
const regExUsername = /^[a-z\d](?:[a-z\d]|-(?=[a-z\d])){0,38}$/i;

export default function makeStatusRequest(testCore: any | null = null): StatusRequest {
let core: CoreActionsForTesting =
Expand Down Expand Up @@ -46,4 +46,4 @@ function validateState(state: any): boolean {
}
export interface CoreActionsForTesting {
getInput: (arg: string) => string
}
}

0 comments on commit e92e907

Please sign in to comment.