Go to file
Shrikanth Upadhayaya b953c700bf
Initialize
2024-09-17 12:12:32 -04:00
Dockerfile Initialize 2024-09-17 12:12:32 -04:00
LICENSE.txt Initialize 2024-09-17 12:12:32 -04:00
README.md Initialize 2024-09-17 12:12:32 -04:00
action.yml Initialize 2024-09-17 12:12:32 -04:00
entrypoint.py Initialize 2024-09-17 12:12:32 -04:00
requirements.txt Initialize 2024-09-17 12:12:32 -04:00

README.md

Create Design Review

Create a Design Review on the current repository using the current branch as HEAD with AllSpice Actions.

Usage

Add the following step to your workflow:

- name: Create Design Review
  uses: https://hub.allspice.io/Actions/create-dr@v0.1
  with:
    title: "My Design Review"
    auth_token: ${{ secrets.ALLSPICE_AUTH_TOKEN }}

To make a design review with a set of changes, you'll need to:

  1. Create or switch to a branch which is not the base branch:

    git switch -c new-branch
    
  2. Make your changes:

    echo "Hello, World!" > hello.txt
    
  3. Configure your git user and email:

    git config --global user.email "my-bot@myorg.com"
    git config --global user.name "My Bot"
    
  4. Commit and push your changes:

    git add .
    git commit -m "Add hello.txt"
    git push origin new-branch
    
  5. Add the action to your workflow:

    - name: Create Design Review
      uses: https://hub.allspice.io/Actions/create-dr@v0.1
      with:
        title: "My Design Review"
        auth_token: ${{ secrets.ALLSPICE_AUTH_TOKEN }}
    

An example job that goes through all of this is:

steps:
  - name: Checkout code
    uses: actions/checkout@v3
  - name: Create a new branch
    run: git switch -c new-branch
  - name: Make changes
    run: echo "Hello, World!" > hello.txt
  - name: Configure git
    run: |
      git config --global user.email "my-bot@myorg.com"
      git config --global user.name "My Bot"      
  - name: Commit changes
    run: |
      git add .
      git commit -m "Add hello.txt"
      git push origin new-branch      
  - name: Create Design Review
    uses: https://hub.allspice.io/Actions/create-dr@v0.1
    with:
      title: "My Design Review"
      auth_token: ${{ secrets.ALLSPICE_AUTH_TOKEN }}

Inputs

  • title (required): Title of the design review.
  • description (optional): Description of the design review.
  • base_branch_name (optional): The name of the branch to use as the base for the DR. If not provided, the default branch is used.
  • log_level (optional): Level of logger to use. Default is "INFO".

Example

- name: Create Design Review
  uses: https://hub.allspice.io/Actions/create-dr@v0.1
  with:
    title: "New Feature Design Review"
    description: "Review of the new feature implementation"
    base_branch_name: "develop"
    log_level: "DEBUG"
    auth_token: ${{ secrets.ALLSPICE_AUTH_TOKEN }}

Important Notes

  1. The action uses the current branch as the HEAD for the Design Review.
  2. If base_branch_name is not provided, the default branch of the repository will be used as the base for the Design Review.
  3. An auth token is required, and the default ${{ gitea.token }} value does not work.

SSL

If your instance is running on a self-signed certificate, you can tell the action to use your certificate by setting the REQUESTS_CA_BUNDLE environment variable.

- name: Create Design Review
  uses: https://hub.allspice.io/Actions/create-dr@v0.1
  with:
    title: "Automated Design Review"
    auth_token: ${{ secrets.ALLSPICE_AUTH_TOKEN }}
  env:
    REQUESTS_CA_BUNDLE: /path/to/your/certificate.cert

For more information about AllSpice Actions and how to use them in your workflows, please refer to the AllSpice Documentation.