[ https://issues.apache.org/jira/browse/BEAM-6557?focusedWorklogId=230894&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-230894 ]
ASF GitHub Bot logged work on BEAM-6557: ---------------------------------------- Author: ASF GitHub Bot Created on: 22/Apr/19 21:17 Start Date: 22/Apr/19 21:17 Worklog Time Spent: 10m Work Description: davidcavazos commented on pull request #7679: [BEAM-6557] Adds an interactive "Try Apache Beam" page URL: https://github.com/apache/beam/pull/7679#discussion_r277440850 ########## File path: website/build.gradle ########## @@ -152,36 +188,49 @@ def getBaseUrl() { return "${System.getProperty('user.name')}-${buildContext}" } +def getBranchRepo() { + def stdout = new ByteArrayOutputStream() + exec { + commandLine 'git', 'config', '--get', 'remote.origin.url' + standardOutput = stdout + } + def matches = (stdout =~ /git@github\.com:(\w+\/\w+)\.git/) Review comment: It works differently locally and on Jenkins. The basic idea is that we want files to point to the pull request's branch for testing and staging, but to point to the master branch once it's in production. I eventually changed all this into this: ``` /** * Gets the branch repository where the new files are located. This is used to point * all the GitHub and Colab files to the pull request's branch when testing, while * pointing them to the apache/beam master branch on production. This is done so tests * and staged versions work even when the files don't exist in master yet. */ def getBranchRepo() { // Jenkins stores the GitHub author in $ghprbPullAuthorLogin def author = System.env.ghprbPullAuthorLogin if (author == null) { // If the author is not defined, it's most probably running locally. // Try to infer the author from the remote URL for (remote in grgit.remote.list()) { if (remote.getName() == 'origin') { // remote.url = 'g...@github.com:author/beam.git' author = remote.url.split(':')[1].split('/')[0] break } } } if (author && grgit) { return "${author}/beam/blob/${grgit.branch.current().getName()}" } return "apache/beam/blob/master" } ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 230894) Time Spent: 4.5h (was: 4h 20m) > Add IPython notebooks for quickstarts and custom I/O > ---------------------------------------------------- > > Key: BEAM-6557 > URL: https://issues.apache.org/jira/browse/BEAM-6557 > Project: Beam > Issue Type: Improvement > Components: website > Reporter: David Cavazos > Assignee: David Cavazos > Priority: Minor > Labels: triaged > Time Spent: 4.5h > Remaining Estimate: 0h > -- This message was sent by Atlassian JIRA (v7.6.3#76005)