-
Notifications
You must be signed in to change notification settings - Fork 86
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
FRI-182 Add setAuthorFlag endpoint #305
Conversation
@@ -19,6 +19,8 @@ | |||
// Metadata for internal use only and can't be updated via branch metadata REST service | |||
public static final String INTERNAL_METADATA_KEY = "internal"; | |||
|
|||
public static final String AUTHOR_FLAGS_METADATA_KEY = "authorFlags"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BranchMetadataHelper
felt like the best location for the new AUTHOR_FLAGS_METADATA_KEY
constant.
@@ -131,6 +132,26 @@ public void unlockBranch(@PathVariable String branch) { | |||
branchService.unlock(branch); | |||
} | |||
|
|||
@RequestMapping(value = "/branches/{branchPath}/actions/set-author-flag", method = RequestMethod.POST) | |||
@PreAuthorize("hasPermission('AUTHOR', #branchPath)") | |||
public BranchPojo setAuthorFlag(@PathVariable String branchPath, @RequestBody SetAuthorFlag setAuthorFlag) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method will receive a key/value and update the Branch's metadata accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Codecov Report
@@ Coverage Diff @@
## develop #305 +/- ##
=============================================
+ Coverage 66.13% 66.17% +0.03%
- Complexity 3888 3896 +8
=============================================
Files 319 320 +1
Lines 16959 16982 +23
Branches 2315 2316 +1
=============================================
+ Hits 11216 11237 +21
- Misses 4819 4820 +1
- Partials 924 925 +1
Continue to review full report at Codecov.
|
Kudos, SonarCloud Quality Gate passed! |
FRI-182 is concerned with adding functionality to allow flags to be associated with Criteria Items.
This feature relies on feature/FRI-182 of AAG.