Skip to content

Commit

Permalink
PTFE-1113 handle pull request event indexing
Browse files Browse the repository at this point in the history
  • Loading branch information
tcarmet committed Oct 25, 2023
1 parent 14f71a1 commit 7e83dce
Show file tree
Hide file tree
Showing 7 changed files with 51,213 additions and 24,373 deletions.
75,269 changes: 50,950 additions & 24,319 deletions dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

47 changes: 47 additions & 0 deletions dist/licenses.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/sourcemap-register.js

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@
"dependencies": {
"@actions/core": "^1.10.0",
"@actions/exec": "^1.1.0",
"@actions/github": "5.0.0",
"@actions/github": "6.0.0",
"@actions/glob": "^0.2.0",
"@octokit/core": "^4.2.4",
"@octokit/rest": "^18.12.0",
"@octokit/types": "^6.34.0",
"@types/async": "^3.2.12",
Expand All @@ -39,7 +40,7 @@
"devDependencies": {
"@types/node": "^16.10.5",
"@typescript-eslint/parser": "^5.0.0",
"@vercel/ncc": "^0.31.1",
"@vercel/ncc": "^0.38.1",
"eslint": "^8.0.1",
"eslint-import-resolver-typescript": "^2.7.1",
"eslint-plugin-github": "^4.3.2",
Expand Down
8 changes: 3 additions & 5 deletions src/artifacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,13 @@ export async function setDefaultIndex(inputs: InputsArtifacts): Promise<void> {
})
const sha: string = github.context.sha
const shortSha: string = sha.substring(0, 10)
const ref: string = github.context.ref
.replace('refs/heads/', '')
.replace('refs/tags/', '')
// Is the build on a tag or a branch
const branch: string = process.env['GITHUB_REF_NAME'] as string
// Is the build reference on a tag or a branch
const refType: string = process.env['GITHUB_REF_TYPE'] || 'branch'
const metadata: object = {
commit: sha,
shortcommit: shortSha,
[refType]: ref
branch: branch
}
// Adding another set of metadata that are equal to action
// in terms of key naming or without any modification to the value
Expand Down
Loading

0 comments on commit 7e83dce

Please sign in to comment.