[ 
https://issues.apache.org/jira/browse/YETUS-494?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Akira Ajisaka updated YETUS-494:
--------------------------------
    Description: 
{{github_jira_bridge}} searches the patch URL as follows:
{code:title=github.sh}
  urlfromjira=$(${AWK} "match(\$0,\"${GITHUB_BASE_URL}/[^ ]*patch[ 
&\\\"]\"){url=substr(\$0,RSTART,RLENGTH-1)}
                        END{if (url) print url}" "${PATCH_DIR}/jira" )
{code}
It would be better the function searches the PR URL (ex. 
https://github.com/apache/hadoop/pull/<# of the PR>) as well. If a jira is 
created after the corresponding PR, ASF GitHub bot does not comment the patch 
URL to the jira. In this case, the search fails. HADOOP-14156 is an example.

  was:
{{github_jira_bridge}} searches the patch URL as follows:
{code:title=github.sh}
  urlfromjira=$(${AWK} "match(\$0,\"${GITHUB_BASE_URL}/[^ ]*patch[ 
&\\\"]\"){url=substr(\$0,RSTART,RLENGTH-1)}
                        END{if (url) print url}" "${PATCH_DIR}/jira" )
{code}
It would be better the function searches the PR URL (ex. 
https://github.com/apache/hadoop/pull/187) as well. If a jira is created after 
the corresponding PR, ASF GitHub bot does not comment the patch URL to the 
jira. In this case, the search fails. HADOOP-14156 is an example.


> smart-apply-patch fails if there is the corresponding PR but the patch URL is 
> not written
> -----------------------------------------------------------------------------------------
>
>                 Key: YETUS-494
>                 URL: https://issues.apache.org/jira/browse/YETUS-494
>             Project: Yetus
>          Issue Type: Bug
>          Components: Test Patch
>    Affects Versions: 0.4.0
>            Reporter: Akira Ajisaka
>            Priority: Minor
>
> {{github_jira_bridge}} searches the patch URL as follows:
> {code:title=github.sh}
>   urlfromjira=$(${AWK} "match(\$0,\"${GITHUB_BASE_URL}/[^ ]*patch[ 
> &\\\"]\"){url=substr(\$0,RSTART,RLENGTH-1)}
>                         END{if (url) print url}" "${PATCH_DIR}/jira" )
> {code}
> It would be better the function searches the PR URL (ex. 
> https://github.com/apache/hadoop/pull/<# of the PR>) as well. If a jira is 
> created after the corresponding PR, ASF GitHub bot does not comment the patch 
> URL to the jira. In this case, the search fails. HADOOP-14156 is an example.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to