Skip to content

Commit

Permalink
remove TODO comment and update error message
Browse files Browse the repository at this point in the history
  • Loading branch information
saravanan30erd committed Mar 30, 2023
1 parent 399442f commit 07c29ba
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/add-to-project.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import * as core from '@actions/core'
import * as github from '@actions/github'

// TODO: Ensure this (and the Octokit client) works for non-github.com URLs, as well.
// https://github.com/orgs|users/<ownerName>/projects/<projectNumber>
const urlParse =
/\/(?<ownerType>orgs|users)\/(?<ownerName>[^/]+)\/projects\/(?<projectNumber>\d+)/

Expand Down Expand Up @@ -80,7 +78,7 @@ export async function addToProject(): Promise<void> {

if (!urlMatch) {
throw new Error(
`Invalid project URL: ${projectUrl}. Project URL should match the format <Github server FQDN>/<orgs-or-users>/<ownerName>/projects/<projectNumber>`,
`Invalid project URL: ${projectUrl}. Project URL should match the format <Github server domain name>/<orgs-or-users>/<ownerName>/projects/<projectNumber>`,
)
}

Expand Down

0 comments on commit 07c29ba

Please sign in to comment.