-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
[JENKINS-37241] Support for query parameters in autocomplete #9959
base: master
Are you sure you want to change the base?
[JENKINS-37241] Support for query parameters in autocomplete #9959
Conversation
// build query parameter line by figuring out what should be submitted | ||
List<String> depends = buildFillDependencies(method, new ArrayList<>()); | ||
if (!depends.isEmpty()) { | ||
attributes.put("fillDependsOn", String.join(" ", depends)); |
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.
I thought about whether this should be a different attribute name, e.g. autocompleteFillDependsOn
but I couldn't see when they would ever clash so I just left it as the same name
const q = qs(e).addThis(); | ||
if (depends && depends.length > 0) { | ||
depends.split(" ").forEach( | ||
TryEach(function (n) { | ||
q.nearBy(n); | ||
}), | ||
); | ||
} | ||
|
||
const queryString = q.toString(); | ||
const idx = queryString.indexOf("?"); | ||
const parameters = queryString.substring(idx + 1); |
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.
copied from hudson-behaviour.js
for the doCheck
functionality.
It uses query string by default and then if the method is post it converts to parameters, (which is the default)
I didn't see any reason for there to need to be an option for get, I'm not aware of it ever being used for the doChecks
Sorry for the delay! I’ll get started on the security review now. |
See JENKINS-37241.
Testing done
Verified that existing usages in core are unaffected:
Created a change in Azure VM agents jenkinsci/azure-vm-agents-plugin#580 which uses the depends on functionality to access query parameters
Proposed changelog entries
@QueryParameter
to the autocomplete componentPOST
for sending requestsProposed upgrade guidelines
N/A
Submitter checklist
Desired reviewers
@mention
Before the changes are marked as
ready-for-merge
:Maintainer checklist