Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Addproxy_ca_certificate_file output tostart-proxy action#2846

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
mbg wants to merge1 commit intomain
base:main
Choose a base branch
Loading
frommbg/private-registries/write-certificate

Conversation

@mbg
Copy link
Member

@mbgmbg commentedApr 7, 2025
edited
Loading

I figured it would be useful to avoid duplicating this across different extractors that e.g. setSSL_CERT_FILE for relevant sub-processes. That's currently done by the C# extractor and looks like will be done by the Go extractor as well. By doing it in the action, we can avoid duplicating this process in those extractors.

Notes/questions for reviewers

  • We might take this opportunity to add corresponding cleanup logic here as well.
  • Currently, the implementation is such that we continue as before if writing the file fails, but we should probably just fail hard to guarantee that the file has been written if the proxy is initialised.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm thereadme has been updated if necessary.
  • Confirm thechangelog has been updated if necessary.

Useful to avoid duplicating this across different extractors (e.g. C# and Go)
@mbgmbg marked this pull request as ready for reviewApril 7, 2025 13:04
CopilotAI review requested due to automatic review settingsApril 7, 2025 13:04
@mbgmbg requested a review froma team as acode ownerApril 7, 2025 13:04
Copy link
Contributor

CopilotAI 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 an output for the proxy CA certificate file in the start-proxy action to avoid duplicating certificate handling in different extractors.

  • Adds FS import and logic to write the CA certificate to a temporary file.
  • Updates the ProxyConfig type to include an optional certificate file property.
  • Mirrors the changes in both the TypeScript and JavaScript implementations.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

FileDescription
src/start-proxy-action.tsAdds certificate file writing logic and exposes its file path output.
lib/start-proxy-action.jsApplies the same certificate file writing changes as in the TS file.
Comments suppressed due to low confidence (1)

lib/start-proxy-action.js:122

  • The catch block only logs the error without failing the action. To guarantee the certificate file is properly written, consider rethrowing the error so that the process fails on write errors.
    } catch (error) {

Tip: Leave feedback on Copilot's review comments with the 👎 and 👍 buttons to help improve review quality.Learn more

fs.writeFileSync(certificatePath,ca.cert);

proxyConfig.ca_certificate_file=certificatePath;
}catch(error){
Copy link

CopilotAIApr 7, 2025

Choose a reason for hiding this comment

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

The catch block only logs the error without failing the action. Given the PR description's goal to ensure the certificate file is successfully written, consider rethrowing the error to fail execution if the write fails.

Copilot uses AI. Check for mistakes.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

Copilot code reviewCopilotCopilot left review comments

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@mbg

[8]ページ先頭

©2009-2025 Movatter.jp