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

path to fix "build now" problems #91

Open
mvk opened this issue Jan 20, 2016 · 3 comments
Open

path to fix "build now" problems #91

mvk opened this issue Jan 20, 2016 · 3 comments

Comments

@mvk
Copy link

mvk commented Jan 20, 2016

NOTE: this is 1 of 2 issues causing these bugs #86 and #73

A regex used in several isJob*() methods does: return path.match(/^\/job\/.*?\//) !== null;, or similar.
This regex assumes the value of window.location.pathname on a job page would always start with /job. This is untrue for various setups, esp. when jenkins is behind a reverse proxy of nginx/apachehttpd/etc., so the value of window.location.pathname can be /ci/job, or even nested: /apps/ci/job. failing to detect we're on a job page results in missing "Build Now" button.
I'm suggesting this regex: return path.match(/^\/(.*\/)?job\/.*?\//), it allows the above paths, but probably could use some finer-tuning.

@kevinburke
Copy link
Owner

sounds good! Want to submit a PR

On Wednesday, January 20, 2016, Max Kovgan notifications@github.com wrote:

NOTE: this is 1 of 2 issues causing these bugs #86
#86 and #73
#73

A regex used in several isJob_() methods does: return
path.match(/^/job/.?//) !== null;, or similar.
This regex assumes the value of window.location.pathname on a job page
would always start with /job. This is untrue for various setups, esp.
when jenkins is behind a reverse proxy of nginx/apachehttpd/etc., so the
value of window.location.pathname can be /ci/job, or even nested:
/apps/ci/job. failing to detect we're on a job page results in missing
"Build Now" button.
I'm suggesting this regex: return path.match(/^/(.
/)?job/._?//), it
allows the above paths, but probably could use some finer-tuning.


Reply to this email directly or view it on GitHub
#91.

Kevin Burke
925.271.7005 | kev.inburke.com

@kevinburke
Copy link
Owner

The compile process for this project is kind of a nightmare just make the
change and I can do the rest

On Wednesday, January 20, 2016, Kevin Burke kev@inburke.com wrote:

sounds good! Want to submit a PR

On Wednesday, January 20, 2016, Max Kovgan <notifications@github.com
javascript:_e(%7B%7D,'cvml','notifications@github.com');> wrote:

NOTE: this is 1 of 2 issues causing these bugs #86
#86 and #73
#73

A regex used in several isJob_() methods does: return
path.match(/^/job/.?//) !== null;, or similar.
This regex assumes the value of window.location.pathname on a job page
would always start with /job. This is untrue for various setups, esp.
when jenkins is behind a reverse proxy of nginx/apachehttpd/etc., so the
value of window.location.pathname can be /ci/job, or even nested:
/apps/ci/job. failing to detect we're on a job page results in missing
"Build Now" button.
I'm suggesting this regex: return path.match(/^/(.
/)?job/._?//), it
allows the above paths, but probably could use some finer-tuning.


Reply to this email directly or view it on GitHub
#91.

Kevin Burke
925.271.7005 | kev.inburke.com

Kevin Burke
925.271.7005 | kev.inburke.com

@mvk
Copy link
Author

mvk commented Jan 21, 2016

@kevinburke I think I can run make,
Actually this patch should be added after the 2nd one, b/c until the 2nd one is constructing good request - this one will expose the button which doesn't work.

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

No branches or pull requests

2 participants