Skip to content

Commit

Permalink
New output feature (#5)
Browse files Browse the repository at this point in the history
* chore: update badge

ref: badges/shields#8671

* feat: add action output

* build

* docs: update README.md

* chore: update

* build

use npm run package

* chore: update `action.yml` outputs
  • Loading branch information
Wxh16144 authored Feb 4, 2023
1 parent 5031b74 commit ce140af
Show file tree
Hide file tree
Showing 4 changed files with 1,920 additions and 225 deletions.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 👁 Issues Similarity Analysis

![](https://img.shields.io/github/workflow/status/actions-cool/issues-similarity-analysis/CI?style=flat-square)
![](https://img.shields.io/github/actions/workflow/status/actions-cool/issues-similarity-analysis/test.yml?branch=main&style=flat-square)
[![](https://img.shields.io/badge/marketplace-issues--similarity--analysis-blueviolet?style=flat-square)](https://github.com/marketplace/actions/issues-similarity-analysis)
[![](https://img.shields.io/github/v/release/actions-cool/issues-similarity-analysis?style=flat-square&color=orange)](https://github.com/actions-cool/issues-similarity-analysis/releases)

Expand Down Expand Up @@ -48,6 +48,20 @@ jobs:
- The filter issues sort by threshold desc
- Support `${index}` `${number}` `${title}` `${similarity}`

The return format is as follows:

```js
"similar-issues": [
{ "number": 6, "title": "bug 2", "similarity": 1 },
{ "number": 10, "title": "bug", "similarity": 0.85 },
{ "number": 8, "title": "bug", "similarity": 0.85 }
],
"similar-issues-found": "true",
"similar-issues-number": "6,10,8"
```

- Return `similar-issues-found`, due to yml reasons, the judgment condition is `if: steps.step-id.outputs.similar-issues-found =='true'`

## ⚡ Feedback

You are very welcome to try it out and put forward your comments. You can use the following methods:
Expand Down
8 changes: 8 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ inputs:
show-footer:
description: Whether show footer.

outputs:
similar-issues-found:
description: Whether similar issues found.
similar-issues:
description: Similar issues Summary.
similar-issues-number:
description: Similar issues Number.

runs:
using: 'node12'
main: 'dist/index.js'
Loading

0 comments on commit ce140af

Please sign in to comment.