Skip to content

Commit

Permalink
remove logging - fix url string
Browse files Browse the repository at this point in the history
  • Loading branch information
ax-vasquez committed Aug 30, 2023
1 parent 9321be8 commit 3a17a1f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
8 changes: 1 addition & 7 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -74845,19 +74845,14 @@ const detectPrNumber = async () => {
CYPRESS_PULL_REQUEST_URL
} = process.env

console.log(`DETECTING PR NUMBER`)

const [owner, repo] = GITHUB_REPOSITORY.split('/')
let prNumber

console.log(`USING TOKEN: `, GITHUB_TOKEN)
if (GITHUB_TOKEN) {
debug(
`Detecting PR number by asking GitHub about run ${GITHUB_RUN_ID}`
)

console.log(`Token detected`)

const client = new Octokit({
auth: GITHUB_TOKEN
})
Expand All @@ -74882,12 +74877,11 @@ const detectPrNumber = async () => {
}

if (prNumber) {
console.log(`PR NUMBER DETECTED: ${prNumber}`)
if (!CYPRESS_PULL_REQUEST_ID) {
core.exportVariable('CYPRESS_PULL_REQUEST_ID', prNumber)
}

const url = `${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/pulls/${prNumber}`
const url = `${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/pull/${prNumber}`
if (!CYPRESS_PULL_REQUEST_URL) {
core.exportVariable('CYPRESS_PULL_REQUEST_URL', url)
}
Expand Down
8 changes: 1 addition & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -449,19 +449,14 @@ const detectPrNumber = async () => {
CYPRESS_PULL_REQUEST_URL
} = process.env

console.log(`DETECTING PR NUMBER`)

const [owner, repo] = GITHUB_REPOSITORY.split('/')
let prNumber

console.log(`USING TOKEN: `, GITHUB_TOKEN)
if (GITHUB_TOKEN) {
debug(
`Detecting PR number by asking GitHub about run ${GITHUB_RUN_ID}`
)

console.log(`Token detected`)

const client = new Octokit({
auth: GITHUB_TOKEN
})
Expand All @@ -486,12 +481,11 @@ const detectPrNumber = async () => {
}

if (prNumber) {
console.log(`PR NUMBER DETECTED: ${prNumber}`)
if (!CYPRESS_PULL_REQUEST_ID) {
core.exportVariable('CYPRESS_PULL_REQUEST_ID', prNumber)
}

const url = `${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/pulls/${prNumber}`
const url = `${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/pull/${prNumber}`
if (!CYPRESS_PULL_REQUEST_URL) {
core.exportVariable('CYPRESS_PULL_REQUEST_URL', url)
}
Expand Down

0 comments on commit 3a17a1f

Please sign in to comment.