Problem Statement
I have a dev and master branch in AWS CodeCommit. I want to issue a pull request with master being the destination and dev being the source. When I inspect StudentCoursework.java in my master branch it shows a multiline comment starting above my getHoursAttempted() method and the comment never closes ( so the class will not compile due to syntax error ).
In my dev branch the same multiline comment also starts above the getHoursAttempted() method but the comment closes 10 lines later. However when I look at a pull request in Split View with master being the destination and dev being the source both sides of the Split View show the multiline comment starting above getHoursAttempted() and ending 10 lines later.
I would expect the left side column to be the destination branch ( master branch ) and therefore I would expect to see the same syntax error ( never ending comment ) that I see when I inspect the file outside of a pull request.
Please see the following screenshots for clarification.
Master Branch
Dev Branch
Split View Configuration
Split View Pull Request ( Master <- Dev )
Question
As you can see from the last image, when I look at a PR in Split View both columns show the comment starting on 272 and ending on 282. However In the screenshot of StudentCoursework.java taken directly from the master branch you can see the comment does not end there. Am I misunderstanding Split View? Is the left-hand side of Split View suppose to be the destination branch?
Related
i wish someone could help me! i will try to be precise to explain what i want to reach.
Imagine that regularly i will have some websites where i will need to inject some javascript through console, or make this scrip to run on the website somehow.
So lets say i have 3 links for now: link1.com, link2.com, link3.com
The behavior i want to reach:
Open 1st tab, go to link1.com, run a js script
Open 2nd tab, go to.... (youve got the idea)
it will always run the same script for every page.
And after it runs the last script in the last tab, i want to start everything again, repeat this loop.
And would be great if this code could be nicely readable and functional, for example. Whenever i wanted to add a new link, i would do this so that the code would keep working without needing to change nothing.
Example: we have an array of links ['link1.com', 'link2.com', 'link3.com']. So for a new link, i just needed to push a new link4.com to the array and everything would work fine. It would suit me a lot.
But if theres even a better idea, i would be welcome. I am totally newbie to iMacros, but i have been here to PC for 12h in a row sitting searching, and i am not getting so great results.
So below is what i have reached so far, but nothing working :/
SET !VAR1 EVAL("array[{{!LOOP}} - 1];")
TAB OPEN
TAB T={{!LOOP}} + 1
URL GOTO={{VAR1}}
WAIT SECONDS=3
SET S EVAL("('{{!LOOP}}' == 1) ? 'imacros://run/?m={{next}}.iim' :
'javascript:undefined;';")
SET test EVAL("{{!LOOP}} > 2 ? 'DONE' : '';")
SET stop EVAL("if ('{{test}}') URL GOTO={{S}};")```
Im trying to change the content of the notification email sent after a test case has been updated to better clarify what has been changed. As it is, the content is hard to read.
Went through the link below to configure the other notification content:
http://kiwitcms.org/blog/atodorov/2018/08/06/how-to-override-templates-for-kiwi-tcms/
The content of the notification email:
Updated on Tue Aug 20 15:47:18 2019
Updated by Admin
--- notes
+++ notes
## -1 +1 ##
-TestTest
+TestTest123123
--- text
+++ text
## -10,7 +10,7 ##
3. item
*Expected results*:
-
+Test
1. item
2. item
3. item
I managed to replicate the example (from the link) for post_case_delete, post_run_save, and user_registered but the dir(tcms/templates/email/) lacks one for test case updates.
EDIT: It seems that adding dir and txt files for the others will undo the changes made to confirm_registration.
Is there a way to amend how the content is shown in the notification email?
Im trying to change the content of the notification email sent after a test case has been updated to better clarify what has been changed.
The link you've posted shows how to override templates (HTML, email, any kind of templates). However what context (e.g. which variables) get passed down to the template is up to the backend functions rendering that particular template.
As it is, the content is hard to read.
We thought diff is a pretty universal format but if you have other suggestions the best way is to start with opening an issue with examples, maybe a POC pull request.
In this particular example change history is automatically generated so any change will likely affect everything which deals with history but we need to see examples to comment further.
EDIT: It seems that adding dir and txt files for the others will undo the changes made to confirm_registration.
This is unrelated to the original question. Again I will have to see what exactly you are doing to tell you if/where the mistake is. The template engine in Django is trying to use the first template with a given name it finds. The search directory path tells it where to look for these templates. If you are somehow obscuring the files from the blog post then the application will not be able to find them hence you are not seeing the overriden changes you expect to.
Also follow https://github.com/kiwitcms/Kiwi/issues/1076 (not directly related but in the same domain space).
Fossil docs says that markdown can be used in tickets as well. But I do not manage to turn it on.
https://www.fossil-scm.org/xfer/tktview/35343257ffd02ba47880 reports a similar problem.
I read a solution in the Fossil-scm mail list but I cannot find the exact email now. However I put my TH1 templates for ticket in the following snippet:
https://bitbucket.org/snippets/ivzhh/GeL9pq
The basic idea is to set $mutype to markdown (x-markdown or x-fossil-markdown). Then add the redering code on line 75~82 in ticket-edit.tcl (the original solution is this post). The markdown rendering returns two values instead of one (default fossil wiki command). Please check the snippet.
I managed to get it work and have created a fossil repository with the three templates I created a repository with the patches on https://chiselapp.com/user/bwl21/repository/fossil-markdown-patches. The repository holds the files but also has applied the same in the configuration such that you can see how it works.
Thanks to #etc-100g
I use opencart version 2.1.0.1
Everytime I click admin > sales > order, it will pop up "error undefined." By closing that popup window, I can still edit order but cannot delete order (no response).
In my log, there is:
PHP Notice: Undefined variable: order_id in
/var/www/html/opencart2101/system/storage/modification/admin/view/template/sale/order_list.tpl on line 821
The line 821 is:
url: 'index.php?route=extension/openbay/addorderinfo&token=<?php echo $token; ?>&order_id=<?php echo $order_id; ?>&status_id=' + status_id,
However, I haven't installed any openbay related module. Also, line 821 is inside <!-- --> mark. It should have no effect.
Help!
Although this is now an older version of opencart, I still see this being reported a lot around and about.
The problem occurs due to the store front adding the http url rather than the https url to the order. So firstly you need to fix that. If you dont want to read all of my explanation, you can just hit up the bold points :)
Either way BACKUP EVERYTHING actually not really, back up the file you are going to edit and backup your whole database.
open:
catalog/controller/checkout/confirm.php at around line 100
Find:
$order_data['store_url'] = HTTP_SERVER;
Change to:
$order_data['store_url'] = HTTPS_SERVER;
Now you will want to fix your database because for reasons I cannot fathom, the domain name is placed in the order along with the stores id. and when editing orders it is the usage of that directly within your admin order page that throws up the undefined notice. Basically the browser blocks the request because its trying to make an insecure request from a secure page.
Crack open phpmyadmin or whatever database tool you have on hand.
locate the table, default is oc_orders
Browsing the table, look for the column that contains your store url (i cant remember the name off hand, i think its just store_url but it will be obvious anyway. if you are multi store you will need to run the query for each
I am sure somebody can come up with a clever way to automatically convert just the http into https with a single use sql query on the one column, but this works for me.
Run SQL: adjust as appropriate
UPDATE `oc_orders` SET `store_url` = 'https://example.com' WHERE store_id = 0;
I would like to add a build step that summarizes my build, using Groovy to read the build log that was generated to date.
I've seen several other questions on SO about related topics but not all of them run, I'm a bit confused on the API docs, and overall I can't seem to get this exact thing running.
Below is the code/resultant failure I have currently.
I have a few questions, if it is ok to put them all together here;
1.Is it safe to test things in the console window? Or, stated differently, when can it be that something works in the /script Groovy console editor window, but it will fail as a Groovy build step? (I think the API differs for the two but I'm not clear how.)
2.Is there a repo anywhere of Groovy Jenkins script examples?
3.How can I do the following?
Read the console log.
Parse it with regex for words of interest, eg "step#2 success".
Rearrange those words into a nice string with some newlines.
Call our internal REST API to submit the results.
thank you so much!
Anne
//Groovy command from SO Post#23139654
def log = manager.build.logFile.text
def summary = log =~ /(?ms)(TEST SUMMARY.*?failures)/
//From there you can extract the matches or as in my case further parse the match:
def total = summary[0] =~ /\d+ tests/
Result includes;
ERROR: Build step failed with exception
groovy.lang.MissingPropertyException: No such property: manager for class: Script1
Here are my answers.
1.Groovy console vs Groovy build step differ as per Jenkins Packages on Groovy Classpath?
2.Examples are available from a user in 2011 and unidentified dates on the wiki: "Jenkins, Groovy System scripts (and Maven) | Code Snippets" https://mriet.wordpress.com/2011/06/23/groovy-jenkins-system-script/
and https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Script+Console
3.To parse the console log and grep outputs , simply input into the web box provided as input for the Editable Email plugin [4] post-build step.
Do NOT use dollar-curlyBrace syntax: use simple dollar-variable or dollar-paren syntax as shown here which is my first crack at the 'Default Content'.
STATUS=$BUILD_STATUS
$DEFAULT_CONTENT
GIT Changelog , Revision = $GIT_REVISION
$CHANGES
LOG-SNIPPETS: Regex Hits/Rules for words that give Unit Test Summaries, Error, Failure, etc =
$BUILD_LOG_REGEX( regex="^.*?BUILD FAILED.*?$", linesBefore=0, linesAfter=10, maxMatches=5, showTruncatedLines=false, escapeHtml=true)
3B.To call the REST plugin, that would need to be done in a separate step, so for now I did not do that.
I had not properly understood the Email-Ext (aka "Editable Email Notification") plugin - that is why I was trying to do this directly in Groovy.
4.[] Email-ext plugin - Jenkins - Jenkins Wiki ; ; https://wiki.jenkins-ci.org/display/JENKINS/Email-ext+plugin