Skip to content

Commit

Permalink
chore: new lock id was not returned
Browse files Browse the repository at this point in the history
  • Loading branch information
FabiLo22 committed Nov 18, 2024
1 parent 2d1ec2a commit b7a772a
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 94 deletions.
109 changes: 24 additions & 85 deletions dist/index.js

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

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

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "typescript-action",
"description": "Givve Automatic Deployment",
"version": "v0.1.4",
"version": "v0.1.5",
"author": "PL Gutscheinsysteme GmbH",
"private": true,
"homepage": "https://github.com/givve/github_deployment_action",
Expand Down
3 changes: 2 additions & 1 deletion src/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ export class GitHub {
{
owner: 'givve',
repo: 'givve',
pull_number: core.getInput('pull_request')
//pull_number: core.getInput('pull_request')
pull_number: 7485
}
)

Expand Down
8 changes: 2 additions & 6 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,17 @@ export async function run(): Promise<void> {
if (core.getInput('pull_request') != '') {
const github = new GitHub()
await github.performAuth()

const labels = await github.getLabels()

if (
!_.includes(labels, 'auto deploy') &&
_.includes(labels, 'manual deploy')
) {
let lock = await getLock()
// No lock, we need to lock deployment
if (!lock) {
const { result } = await setLock(component)
console.log(result)
lock = result
const { data } = await setLock(component)
lock = data.data
}

// Manual deployment, so deployment is not permitted
core.setOutput('deployment_lock', lock.id)
}
Expand Down

0 comments on commit b7a772a

Please sign in to comment.