Skip to content
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

Add additional save protections to ScriptRunner #1072

Merged
merged 4 commits into from
Jan 24, 2024

Conversation

ryanmelt
Copy link
Member

No description provided.

@ryanmelt ryanmelt requested a review from jmthomas January 24, 2024 16:09
Copy link

codecov bot commented Jan 24, 2024

Codecov Report

Attention: 22 lines in your changes are missing coverage. Please review.

Comparison is base (586127d) 75.20% compared to head (fb5cba1) 75.21%.

Files Patch % Lines
...riptrunner/src/tools/ScriptRunner/ScriptRunner.vue 69.86% 19 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1072      +/-   ##
==========================================
+ Coverage   75.20%   75.21%   +0.01%     
==========================================
  Files         592      592              
  Lines       43422    43436      +14     
  Branches      751      754       +3     
==========================================
+ Hits        32654    32671      +17     
+ Misses      10688    10685       -3     
  Partials       80       80              
Flag Coverage Δ
frontend 55.58% <69.86%> (+0.20%) ⬆️
python 83.53% <ø> (-0.02%) ⬇️
ruby-api 48.76% <ø> (ø)
ruby-backend 80.14% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@jmthomas jmthomas left a comment

Choose a reason for hiding this comment

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

I think changing to await on the loads goes a long way to fixing the problem. The saveAllowed variable is now yet another way to determine whether we can save along with this.scriptId and this.editor.getReadOnly() === true. Can this be consolidated down to a single thing we check?

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions

12.1% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

@ryanmelt ryanmelt merged commit 902e54e into main Jan 24, 2024
23 of 24 checks passed
@ryanmelt ryanmelt deleted the scriptrunner_save_protections branch January 24, 2024 21:53
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