[go: up one dir, main page]

Skip to content

Latest commit

 

History

History
 
 

add-review-url

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Azure Dev Spaces GitHub Action for adding the review url on pull request

Azure Dev Spaces can provide reviewers a live, sandboxed preview of the pull request's changes before code is merged into the main branch. The add-review-url GitHub Action writes the URL of the preview app as a comment on the pull request.

How to include this action in our pull request workflow

Refer to the documentation for Azure Dev-spaces sample app - Pull Request Flow Documentation for Azure Dev Spaces

Example workflow syntax

The following Action snippet is used in the Bikesharing sample PR workflow

    - uses: azure/dev-spaces/actions/add-review-url@Releases/v2              
      with:
        repo-token: ${{ secrets.GITHUB_TOKEN }}  
        host: ${{ secrets.HOST }}
        child-space: ${{steps.generate-child-space-name.outputs.result}}
        protocol: 'http'

where: secrets.HOST is the host URL for the app deployed in AKS. See Pull Request Flow Documentation for Azure Dev Spaces protocol is an optional parameter that user can so choose to specify as https vs http as the case maybe. By default, its value is http. This is used to construct the URL of the preview app

How to build this GitHub Action for development

Navigate to the directory: .\actions\add-review-url\src and run

    npm install
    npm run build

How to build and test the unit tests for this GitHub Action

Using Jest Test Framework. Refer to tests in \actions\add-review-url_test_

        npm install
        npm run build
        npm run test