An open API service indexing awesome lists of open source software.

https://github.com/projectwallace/css-diff-action

Project Wallace GitHub Action to report CSS diffs to PR's
https://github.com/projectwallace/css-diff-action

Last synced: 11 months ago
JSON representation

Project Wallace GitHub Action to report CSS diffs to PR's

Awesome Lists containing this project

README

          

# Project Wallace Diff Github Action

This GitHub actions posts your CSS to [projectwallace.com](https://www.projectwallace.com?ref=gh-diff-action), calculates the change between the current state of your project and your PR, and comments the diff in the PR.

![Example comment](https://repository-images.githubusercontent.com/249823357/07b48c00-7aba-11ea-8c20-bf349a3005ac)

## Usage

### Inputs

| Name | Required | Example | Description |
| ----------------------- | ---------- | ------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `github-token` | _required_ | `github-token: ${{ secrets.GITHUB_TOKEN }}` | This Action uses this token to post a comment with the diff. |
| `project-wallace-token` | _required_ | `project-wallace-token: ${{ secrets.PROJECT_WALLACE_TOKEN }}` | The webhook token for your project on projectwallace.com. You can find this token in the project settings. You must add this token to your [repository secrets](https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets#creating-encrypted-secrets) first! |
| `css-path` | _required_ | `css-path: ./build/style.css` | Path to the CSS file that should be analyzed and compared to the data on projectwallace.com. |
| `post-pr-comment` | _optional_ | `true` | Whether this action should post a comment to the PR with changes |

### Example

```yaml
name: CSS Workflow

on:
pull_request: # only run this action on pull requests
branches: [master] # and only to the master branch

jobs:
cssDiff:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Project Wallace Diff
uses: projectwallace/css-diff-action@master
with:
project-wallace-token: ${{ secrets.PROJECT_WALLACE_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
css-path: ./build/style.css
```