Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brob/github-issues-search-bot
https://github.com/brob/github-issues-search-bot
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/brob/github-issues-search-bot
- Owner: brob
- License: mit
- Created: 2021-11-16T18:12:47.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-15T11:36:27.000Z (about 1 year ago)
- Last Synced: 2024-11-07T00:30:30.896Z (about 2 months ago)
- Size: 25.4 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 41
-
Metadata Files:
- Readme: readme.md
- License: LICENSE.md
Awesome Lists containing this project
README
# GitHub Recommended Issues Bot
When users leave an Issue on a repository, getting timely feedback is critical. If their Issue is actually a duplicate or something that other contributors/users are talking about, it would be good for them to know this.
This bot uses Algolia to index and perform searches against a repository's Issue history to leave a selection of possibly related Issues on a newly opened Issue.
## Usage
The workflow depends on three different Actions.
1. [An action to search Algolia Records](https://github.com/marketplace/actions/get-algolia-issue-records)
2. [An action to leave a comment based on the search results](https://github.com/marketplace/actions/create-or-update-comment)
3. [An action to ingest the inciting Issue into the Algolia Index](https://github.com/marketplace/actions/create-or-update-algolia-index-record)```yaml
# This is a basic workflow to help you get started with Actions
name: related-issues# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
issues:
types:
- opened# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
get-related-issues:
permissions:
issues: write
runs-on: ubuntu-latest
steps:
- id: search
name: Search based on issue title
uses: brob/[email protected]
with:
app_id: ${{ secrets.ALGOLIA_APP_ID }}
api_key: ${{ secrets.ALGOLIA_API_KEY }}
index_name: ${{ github.event.repository.name }}
issue_title: ${{ github.event.issue.title }}
- name: Create or Update Comment
uses: peter-evans/[email protected]
with:
# GITHUB_TOKEN or a repo scoped PAT.
token: ${{ github.token }}
# The number of the issue or pull request in which to create a comment.
issue-number: ${{ github.event.issue.number }}
# The comment body.
body: |
# While you wait, here are related issues:
${{ steps.search.outputs.issues_list }}
just a test of post comment
- name: Add Algolia Record
id: ingest
uses: chuckmeyer/add-algolia-record@v0with:
app_id: ${{ secrets.ALGOLIA_APP_ID }}
api_key: ${{ secrets.ALGOLIA_API_KEY }}
index_name: ${{ github.event.repository.name }}
record: |
{
"title": "${{ github.event.issue.title }}",
"url": "${{ github.event.issue.html_url }}",
"labels": "${{ github.event.issue.labels }}",
"objectID": "${{ github.event.issue.number }}"
}
```