Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions _docs/integrations/bitbucket-integration.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
title: "EkLine Bitbucket Integration Guide"
label: "Bitbucket Integration"
description: "This guide will walk you through setting up the EkLine integration with Bitbucket."
position: 6
---

## Prerequisites

1. You have an EkLine API token provided by the EkLine contact person.
2. You have a Bitbucket account and the necessary permissions to configure pipelines.

## Create `bitbucket-pipelines.yml` file

Create a new file named **`bitbucket-pipelines.yml`** in your project's root directory and add the following content:

```yaml
runEkLineStep: &runEkLineStep
name: EkLine Documentation Review
image:
name: ghcr.io/ekline-io/ekline-ci-cd:v6.8
script:
- export EK_TOKEN=$EK_TOKEN
- export INPUT_CONTENT_DIR='<path_to_content_directory>'
- /entrypoint.sh

pipelines:
branches:
main:
- step: *runEkLineStep

pull-requests:
'**':
- step: *runEkLineStep
```

Replace **`<path_to_content_directory>`** with the actual path to your content directory.

## Configure Bitbucket environment variables

1. In Bitbucket, navigate to your repository settings.
2. Go to **Repository settings > Pipelines > Repository variables**.
3. Add the following variables:
**`EK_TOKEN`**: Your EkLine API token.

## Configure input options

### Ignoring specific rules (Optional)

To ignore specific rules during the review process, you can use the `INPUT_IGNORE_RULE` flag. This flag accepts a comma-separated list of rule identifiers that you wish to skip.

For example, if you want to ignore rules `EK00001` and `EK00004`, you can set the `INPUT_IGNORE_RULE` flag in your configuration like this:

```yaml
INPUT_IGNORE_RULE: "EK00001,EK00004"
2 changes: 1 addition & 1 deletion _docs/integrations/cli-integration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Disables suggestions. Please note that suggestions are only generated for **`.js

- **i, --ignore `<rules>`**

Ignores specified rules during the check. Rules should be passed as comma-separated values. For example, **`EK1,EK4`**.
Ignore specified rules during the check. Pass the rules as comma-separated values. For example, **`EK1,EK4`**.

- **cd, --content-directory `<contentDirectory...>`**

Expand Down
5 changes: 3 additions & 2 deletions _docs/integrations/github-action-label.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ position: 2
- A GitHub repository with EkLine set up.
- EkLine GitHub Action configured in your repository.


## Steps

1. Open the **`.github/workflows/ekline.yml`** file in your GitHub repository.
Expand Down Expand Up @@ -40,7 +41,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ekline-io/ekline-github-action@v5.6.0
- uses: ekline-io/ekline-github-action@v6
with:
content_dir: ./src/docs
ek_token: ${{ secrets.ek_token }}
Expand All @@ -54,4 +55,4 @@ With these changes, EkLine GitHub Action triggers when someone adds a label name

## Usage

Add the "ekline" label to a specific pull request to run the EkLine GitHub Action. Upon adding the label, the action triggers and executes the configured checks.
Add the "ekline" label to a specific pull request to run the EkLine GitHub Action. Upon adding the label, the action triggers and executes the configured checks.
47 changes: 31 additions & 16 deletions _docs/integrations/github-integration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ position: 1

## Prerequisites

Before you begin, make sure you have the following:
Before you begin, ensure you have the following:

- You have an EkLine API token provided by the EkLine contact person.
- An EkLine API token. You can obtain this by navigating to **EkLine.io > Settings > Organization > Access Token**.

## Create a new GitHub Actions workflow

In your GitHub repository, navigate to the "Actions" tab. Click "New workflow" and choose the "set up a workflow yourself" option.

In the new workflow file, you can name it **`ekline.yml`**. This file will be stored in the **`.github/workflows/`** directory in your repository.
In the new workflow file, you can name it **`ekline.yml`**. GitHub stores this file in the **`.github/workflows/`** directory in your repository.

## Configure the EkLine GitHub Action
## Configure the EkLine GitHub action

Copy and paste the following template into your workflow file:

Expand All @@ -34,9 +34,12 @@ jobs:
if: github.event_name == 'pull_request'
name: runner / EkLine Reviewer (github-pr-review)
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v3
- uses: ekline-io/ekline-github-action@v5.8.0
- uses: ekline-io/ekline-github-action@v6
with:
content_dir: ./src/docs
ek_token: ${{ secrets.ek_token }}
Expand All @@ -54,22 +57,22 @@ Adjust the configuration options as needed for your specific use case. The avail
- **`github_token`**: The GITHUB_TOKEN (default: **`${{ secrets.github_token }}`**).
- **`reporter`**: The reporter of the EkLine review command [github-pr-check, github-check, github-pr-review] (default: **`github-pr-check`**).

### Filter Modes
### Filter modes

You can control how the EkLine reviewer filters results by specifying the **`filter_mode`** option. Available filter modes are as below:

- **`added`** (default): Filter results by added or modified lines.
- **`diff_context`**: Filter results by diff context. That's, changed lines +-N lines (N=3, for example).
- **`file`**: Filter results by added or modified file. EkLine reviewer will report results as long as they are in an added or modified file, even if the results aren't in the actual diff.
- **`file`**: Filter results by added or modified file. EkLine reviewer reports results as long as they're in an added or modified file, even if the results aren't in the actual diff.
- **`nofilter`**: Don't filter any results. Useful for posting results as comments as much as possible and checking other results in the console simultaneously.

### Reporter Types
### Reporter types

- **`github-pr-check`**: Reports results to GitHub Checks.
- **`github-check`**: Similar to **`github-pr-check`**, but works for both pull requests and commits.
- **`github-pr-review`**: Reports results to GitHub PullRequest review comments using a GitHub Personal API Access Token.

### Ignoring Specific Rules
### Ignoring specific rules

To ignore specific rules during the review process, you can use the `ignore_rule` flag. This flag accepts a comma-separated list of rule identifiers that you wish to skip.

Expand All @@ -81,7 +84,7 @@ For example, if you want to ignore rules `EK00001` and `EK00004`, you can set th

## Save and commit the workflow file

After configuring the workflow file, click "Start commit" to save and commit the file to your repository. The EkLine GitHub Action will now run automatically when you push changes to the **`master`** or **`main`** branches or create a pull request.
After configuring the workflow file, click "Start commit" to save and commit the file to your repository. The EkLine GitHub Action runs automatically when you push changes to the **`master`** or **`main`** branches or create a pull request.

## Add the EkLine API token to your repository secrets

Expand All @@ -96,28 +99,40 @@ Before the action can work, you need to provide the EkLine API token. Go to your
alt={`Update Secrets`}
/>

## Grant Write Permissions to Workflows
## Grant write permissions to workflows

To enable the EkLine GitHub Action to add comments to pull requests, you must grant write permissions to workflows.
To enable the EkLine GitHub Action to add comments to pull requests, you must grant write permissions to workflows. There are two ways to achieve this:

To do this, navigate to **Settings > Code and Automation > Actions > General > Workflow permissions**. Then, click the drop-down menu and select **"Read and write permissions"**. Click on **"Save"** to apply the changes.
### Option 1: Through repository settings

1. Navigate to **Settings > Code and Automation > Actions > General > Workflow permissions**.
2. Click the drop-down menu and select **Read and write permissions**.
3. Click on **Save** to apply the changes.

<img
className={'rounded-2xl'}
width={1880}
height={1044}
src={`/assets/images/docs/workflow.png`}
alt={`Grant Write Permissions to Workflows`}
alt={`Grant write permissions to workflows`}
/>

### Option 2: Through the workflow file

## Monitor the EkLine GitHub Action results
Add the following permissions block to your workflow file:

```yaml
permissions:
contents: read
pull-requests: write
```

## Check the EkLine GitHub Action results

Once the EkLine GitHub Action runs, you can view the results in the "Actions" tab of your repository.

Now, you have integrated the EkLine GitHub Action into your repository for automated documentation review. Enjoy better quality and consistency in your documentation.

### Other options:
## Other options

[EkLine GitHub Action on Label](/documentation/github-action-label)
2 changes: 1 addition & 1 deletion _docs/integrations/gitlab-integration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ stages:

ekline-pr-review-job:
stage: ekline-pr-review
image: ghcr.io/ekline-io/ekline-ci-cd:v5.6.0
image: ghcr.io/ekline-io/ekline-ci-cd:v6
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
script:
Expand Down
4 changes: 3 additions & 1 deletion _docs/integrations/integrations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ position: 0

[CLI](/documentation/cli-integration)

[VSCode Integration](/documentation/vscode-integration)
[VSCode Integration](/documentation/vscode-integration)

[Bitbucket Integration](/documentation/bitbucket-integration)
14 changes: 7 additions & 7 deletions _docs/integrations/vscode-integration.mdx
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
---
title: "EkLine VSCode Integration"
label: "EkLine VSCode Integration"
description: "EkLine flags any style guide violations in your company's code with Visual Studio Code diagnostics. It offers immediate feedback, facilitating consistent writing in your documentation."
label: "VSCode Integration"
description: "EkLine flags any style guide violations in your company's documentation with Visual Studio Code diagnostics. It offers immediate feedback, facilitating consistency in your documentation."
position: 5
---

# Prerequisites
## Prerequisites

You have an EkLine API token provided by the EkLine contact person.

# Getting started
## Getting started

## Installation
### Installation

To install the VSCode extension from the web, follow these steps:

Expand All @@ -28,14 +28,14 @@ To install the VSCode extension from within VSCode,
3. Type "EkLine" in the Extensions view search box.
4. Click the "Install" button next to the extension with the same name.

## Configure EkLine linter
### Configure EkLine linter

EkLine asks for an API Token at first activation.

If you cancel or input an invalid token, the extension displays a popup offering another chance to set up EkLine or turn off for avoiding future popups.
Once turned off, execute 'Configure EkLine Linter' from the Command Palette or clear the 'off' box in Extension Settings.

# Usage
## Usage

The extension runs EkLine on supported files when opened or saved.

Expand Down