Skip to content

Conversation

@xakraz
Copy link

@xakraz xakraz commented Sep 24, 2025

Address #168

@GrantBirki
Copy link
Member

👋 @xakraz hey! I see you are still actively working on this PR. I just merged a pretty large PR that migrates the project from CommonJS to ES modules and it looks like it has caused a lot of merge conflicts on your PR and just wanted to say I am sorry as that is no fun.

@xakraz
Copy link
Author

xakraz commented Oct 8, 2025

👋 @xakraz hey! I see you are still actively working on this PR. I just merged a pretty large PR that migrates the project from CommonJS to ES modules and it looks like it has caused a lot of merge conflicts on your PR and just wanted to say I am sorry as that is no fun.

Arf, I was almost there 😅
I have 1 last check to do that I was not able to make yesterday.

Nevermind, I will try to update my PR 🤷‍♂️
Thanks for the heads up 🙏

…ent auto unlock feature on pull request closure

- Update the `action.yml` file to include a new `unlock_on_close_mode` input
- Add a new file `unlock-on-close.js` with a function to release locks when a pull request is closed
- Update the `unlock-on-merge.js` file to include a reference to `lock metadata` and other related functions
- Introduce a new function `unlockOnClose` in the `main.js` file to run auto-unlock logic in the `unlock on close` mode
…ut parameter

- Change description of `deployment_task` in `action.yml`
- Modify parsing of task parameter in `src/functions/environment-targets.js`
- Update handling of `deployment_task` in `src/functions/inputs.js`
- Introduce task validation logic in `src/main.js`
@xakraz xakraz force-pushed the feat/deployment-task branch from ff85cc2 to 7c076ab Compare November 8, 2025 18:08
- Fixed ESM import conflicts in src/main.js (added .js extensions)
- Updated all test files to use Vitest (vi) instead of Jest
- Added missing imports in test files
- Mocked actionStatus in environment-targets.test.js
- Regenerated dist files with correct source maps
- All tests passing with 100% coverage
@xakraz xakraz force-pushed the feat/deployment-task branch from 7c076ab to 129fa69 Compare November 8, 2025 18:09
@xakraz xakraz marked this pull request as ready for review November 8, 2025 18:09
@xakraz xakraz requested a review from GrantBirki as a code owner November 8, 2025 18:09
Copilot AI review requested due to automatic review settings November 8, 2025 18:09
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for task-based concurrent deployments to the same environment and introduces an "unlock on close" mode. The key changes enable multiple deployment workflows to run simultaneously against the same environment by using task identifiers (e.g., --task frontend, --task backend), while maintaining separate locks per task. Additionally, it provides a new unlock-on-close mode to automatically release locks when PRs are closed (not merged).

Key Changes:

  • Task parameter support for concurrent deployments with --task flag in PR comments
  • Lock mechanism enhancement to include task identifiers in branch names
  • New unlock-on-close mode for automatic lock cleanup on PR closure

Reviewed Changes

Copilot reviewed 18 out of 20 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/main.js Adds unlock-on-close mode, task validation logic, and passes task parameter through deployment flow
src/functions/lock.js Updates lock branch naming to include task suffix and enhances ownership checks with branch comparison
src/functions/unlock.js Adds task parameter parsing from comments and includes task in lock branch names
src/functions/unlock-on-merge.js Updates to handle multiple lock branches per environment when deployment_task is 'all'
src/functions/unlock-on-close.js New file implementing unlock functionality for closed (non-merged) PRs
src/functions/environment-targets.js Adds task parsing from --task flag in deployment commands
src/functions/deployment.js Updates deployment queries to filter by task parameter
src/functions/valid-deployment-order.js Passes task parameter through to deployment checks
src/functions/post-deploy.js Updates lock function calls with null task parameter
src/functions/inputs.js Adds deployment_task input handling with 'all' or comma-separated list support
action.yml Adds deployment_task and unlock_on_close_mode inputs, plus deployment_task output
tests/*.test.js Comprehensive test coverage for all new task-related functionality

@xakraz
Copy link
Author

xakraz commented Nov 8, 2025

Hi @GrantBirki 👋🏻

One month later, I finally got time to update my PR 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants