Skip to content

Deployment Confirmation #374

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Mar 13, 2025
Merged

Deployment Confirmation #374

merged 6 commits into from
Mar 13, 2025

Conversation

GrantBirki
Copy link
Member

@GrantBirki GrantBirki commented Mar 13, 2025

Deployment Confirmation

This pull request introduces two new input options to toggle on/off Deployment Confirmation.

  • deployment_confirmation - Whether or not to require an additional confirmation before a deployment can continue. Default is "false". If your project requires elevated security, it is highly recommended to enable this option - especially in open source projects where you might be deploying forks.
  • deployment_confirmation_timeout - The number of seconds to wait for a deployment confirmation before timing out. Default is "60" seconds (1 minute).

Demo 📹

Screen.Recording.2025-03-13.at.12.46.36.PM.mov

If I were to react with a 👎 the deployment would be rejected and not start. Also, I were to just not react at all, the deployment would also be rejected after the timeout period of 60 seconds.


Related: #373

@GrantBirki GrantBirki added the enhancement New feature or request label Mar 13, 2025
@GrantBirki GrantBirki self-assigned this Mar 13, 2025
@GrantBirki GrantBirki marked this pull request as ready for review March 13, 2025 19:49
@Copilot Copilot AI review requested due to automatic review settings March 13, 2025 19:49
Copy link
Contributor

@Copilot 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 pull request adds two new input options—deployment confirmation and its timeout—to the deployment process, including all associated tests, documentation, and schema updates.

  • Introduces the deployment confirmation logic in src/functions/deployment-confirmation.js.
  • Updates tests in tests/functions/deployment-confirmation.test.js, tests/main.test.js, and tests/functions/help.test.js.
  • Adds new input fields and updates the Action documentation, schema, and README.

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/functions/deployment-confirmation.js Adds logic to prompt for and process deployment confirmation via reactions.
tests/functions/deployment-confirmation.test.js Adds tests covering various confirmation scenarios.
tests/main.test.js Updates tests to cover deployment confirmation success, failure, and input parsing error.
tests/schemas/action.schema.yml Introduces new schema definitions for deployment confirmation inputs.
src/functions/inputs.js Adds helper function getIntInput for parsing integer inputs.
action.yml, README.md, src/functions/help.js, tests/functions/help.test.js Updates documentation and help messages to include the new inputs.

Tip: Copilot code review supports C#, Go, Java, JavaScript, Markdown, Python, Ruby and TypeScript, with more languages coming soon. Learn more

@GrantBirki GrantBirki merged commit 795ae02 into main Mar 13, 2025
4 checks passed
@GrantBirki GrantBirki deleted the deployment-confirmation branch March 13, 2025 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants