Skip to content
This repository has been archived by the owner on Apr 7, 2024. It is now read-only.

Add CI docs #71

Merged
merged 13 commits into from
Jan 16, 2024
5 changes: 5 additions & 0 deletions .changeset/dull-bugs-cry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@floe/review-action": minor
---

Modify diff lookup strategy to support forked braches in PRs.
1 change: 1 addition & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"changesets": [
"bright-ducks-help",
"clean-drinks-laugh",
"dull-bugs-cry",
"dull-buttons-draw",
"dull-yaks-worry",
"fast-coins-unite",
Expand Down
5 changes: 3 additions & 2 deletions .floe/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
},
"rulesets": {
"docs": {
"include": ["**/*.md", "**/*.mdx"],
"include": ["apps/web/pages/docs/**/*.{md,mdx}"],
"rules": {
"spelling-and-grammar": "warn"
"spelling-and-grammar": "warn",
"docs-style": "warn"
}
}
}
Expand Down
1 change: 1 addition & 0 deletions .floe/rules/docs-style.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Don't use "we" or "I"
6 changes: 6 additions & 0 deletions actions/review-action/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @floe/review-action

## 0.1.0-beta.6

### Minor Changes

- b7e69cc: Modify diff lookup strategy to support forked braches in PRs.

## 0.1.0-beta.5

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion actions/review-action/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@floe/review-action",
"version": "0.1.0-beta.5",
"version": "0.1.0-beta.6",
"private": true,
"scripts": {
"build": "ncc build src/index.ts --out dist --source-map --license licenses.txt",
Expand Down
1 change: 1 addition & 0 deletions apps/web/pages/docs/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"quick-start": "Quick start",
"usage": "Basic usage",
"configuration": "Configuration",
"ci": "CI",
"-- API reference": {
"type": "separator",
"title": "API reference"
Expand Down
53 changes: 53 additions & 0 deletions apps/web/pages/docs/ci.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import { Callout } from 'nextra/components'

# CI

Using the Floe Reviews GitHub Action is the easiest way to integrate Floe
NicHaley marked this conversation as resolved.
Show resolved Hide resolved
Reviews into your CI pipeline. The action will automatically review your pull
request diffs and leave comments for issues and suggested fixes.

## Usage

Copy the following workflow into the repository's `.github/workflows` directory.

<Callout emoji="💡">Be sure to set `FLOE_API_WORKSPACE` and
`FLOE_API_SECRET` on the "Actions secrets and variables" page in your GitHub
NicHaley marked this conversation as resolved.
Show resolved Hide resolved
settings. `GITHUB_TOKEN` is available by default.</Callout>

```yaml copy filename=".github/workflows/floe-review.yml"
name: "Floe Review"
on:
pull_request:

jobs:
Review:
env:
FLOE_API_WORKSPACE: ${{ secrets.FLOE_API_WORKSPACE }}
FLOE_API_SECRET: ${{ secrets.FLOE_API_SECRET }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

# Checkout the Floe repository
- name: Checkout Floe
uses: actions/checkout@v4
with:
repository: Floe-dev/floe
ref: "@floe/[email protected]"
path: ./.github/actions/floe-actions

# Run the review action
- name: Review
uses: ./.github/actions/floe-actions/actions/review-action
```

## Versioning

The Floe Review GitHub Action is versioned using the `ref` attribute and passing
a git tag. You can find the latest `@floe/review-action`
NicHaley marked this conversation as resolved.
Show resolved Hide resolved
[here](https://github.com/Floe-dev/floe/tags).

You can keep Floe up to date with the latest versioning by removing the `ref`,
NicHaley marked this conversation as resolved.
Show resolved Hide resolved
but this is not recommended while Floe is in beta.