Skip to content

Commit

Permalink
docs: update
Browse files Browse the repository at this point in the history
  • Loading branch information
peaceiris committed Sep 17, 2020
1 parent e119cb5 commit 5234a7b
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 5 deletions.
98 changes: 93 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

A GitHub Action to suggest related or similar issues, documents, and links. Based on the power of NLP and fastText.

![Suggest Related Links Action example result | peaceiris/actions-suggest-related-links](./images/example.jpg)



## Table of Contents
Expand All @@ -10,7 +12,11 @@ A GitHub Action to suggest related or similar issues, documents, and links. Base
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->


- [Models](#models)
- [Getting Started](#getting-started)
- [Create Workflow](#create-workflow)
- [Save Issues Data](#save-issues-data)
- [Create Issue](#create-issue)
- [Overview](#overview)
- [Data Collection](#data-collection)
- [Preprocessing](#preprocessing)
- [Train Model](#train-model)
Expand All @@ -21,12 +27,92 @@ A GitHub Action to suggest related or similar issues, documents, and links. Base

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

## Models

Our GitHub Action is **actions-suggest-related-links**, which suggests related or similar issues, documents, and links.
## Getting Started

### Create Workflow

Create your YAML workflow file as follows.

e.g. `.github/workflows/suggest-related-links.yml`

```yaml
name: 'Suggest Related Links'

on:
issues:
types:
- opened
- edited
workflow_dispatch:
schedule:
- cron: '13 13 * * */7'

jobs:
action:
runs-on: ubuntu-18.04
steps:
- name: Setup Python
if: github.event_name == 'issues'
uses: actions/setup-python@v2.1.2
with:
python-version: '3.8'

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/actions-suggest-related-links-tmp
key: ${{ runner.os }}-action-${{ hashFiles('~/actions-suggest-related-links-tmp/training-data.json') }}
restore-keys: |
${{ runner.os }}-action-
- uses: peaceiris/actions-suggest-related-links@v1.0.0

- name: Setup model
if: github.event_name == 'issues'
run: |
cd ~
git clone https://github.com/peaceiris/actions-suggest-related-links.git
cd ./actions-suggest-related-links/models
git checkout v1.0.0
python3 -m pip install -r ./requirements.txt
- name: fastText
if: github.event_name == 'issues'
run: |
cd ~/actions-suggest-related-links/models/fasttext
cp ~/actions-suggest-related-links-tmp/training-data.json .
cp ~/actions-suggest-related-links-tmp/input.txt .
python3 train.py -d training-data.json -test input.txt
cp ./suggestions.json ~/actions-suggest-related-links-tmp/
- uses: peaceiris/actions-suggest-related-links@v1.0.0
with:
mode: 'suggest'
```
### Save Issues Data
Run It manually only the first time to save issues data.
![Run workflow manually to save issues data | peaceiris/actions-suggest-related-links](./images/manually.jpg)
### Create Issue
Some related links which are similar to the created issue body will be listed by this action.
![Suggest Related Links Action example result | peaceiris/actions-suggest-related-links](./images/example.jpg)
<div align="right"><a href="#table-of-contents">Back to TOC ☝️</a></div>
## Overview
Our GitHub Action is **actions-suggest-related-links**, which suggests related or similar issues, documents, and links.
This action mainly consists of 5 parts: Data Collection, Preprocessing, Train model, Find similar issues, and Suggest Issues.
![workflow](https://user-images.githubusercontent.com/39023477/93440029-37d64580-f90a-11ea-8e7b-625992aa0a58.jpg)
![Workflow Overview | ](./images/flow.jpg)
### Data Collection
Expand All @@ -48,6 +134,8 @@ Calculate word vectors of training data and word vectors of posted data in fastt

### Suggest Issues

<div align="right"><a href="#table-of-contents">Back to TOC ☝️</a></div>



## Maintainers
Expand All @@ -59,6 +147,6 @@ Calculate word vectors of training data and word vectors of posted data in fastt

## License

MIT License
- [MIT License | peaceiris/actions-suggest-related-links/LICENSE](https://github.com/peaceiris/actions-suggest-related-links/blob/main/LICENSE)

<div align="right"><a href="#table-of-contents">Back to TOC ☝️</a></div>
Binary file added images/example.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/flow.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/manually.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5234a7b

Please sign in to comment.