Skip to content

Commit a32318a

Browse files
committed
feat: initial implementation
0 parents  commit a32318a

File tree

541 files changed

+212552
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

541 files changed

+212552
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.history/

README.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Check versions action
2+
3+
This action checks for missing or outdated versions of packages mentioned in the issue.
4+
5+
## How it works
6+
7+
The action will check the issue content for name of packages and try to extract the version numbers. If some of the packages are missing version numbers or don't match the latest version numbers on npm, then it'll comment on the issue.
8+
9+
![demo](assets/screenshot.png)
10+
11+
## Installation
12+
13+
Create a new workflow file (e.g. `.github/workflows/check-versions.yml`) and add the following configuration:
14+
15+
```yml
16+
name: Check versions
17+
on:
18+
issues:
19+
types: [opened]
20+
21+
jobs:
22+
check-versions:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: react-navigation/check-versions-action@master
26+
with:
27+
github-token: ${{ secrets.GITHUB_TOKEN }}
28+
packages: |
29+
@react-navigation/native
30+
@react-navigation/stack
31+
missing-versions-label: 'needs more info'
32+
```
33+
34+
Make sure to change the `packages` list and the `missing-versions-label`.
35+
36+
## Inputs
37+
38+
### `github-token` (`required`)
39+
40+
The `GITHUB_TOKEN` secret. This is needed so that we can post comments on the issue.
41+
42+
### `packages` (`required`)
43+
44+
List of packages to check for. The action will match the content of the issue against these package names to find mentioned versions. If there are packages present in the issue, but not mentioned in this list, then they will be ignored.
45+
46+
### `comment`
47+
48+
Boolean to indicate whether the action should comment on the issue on finding missing or outdated versions. Defaults to `true`.
49+
50+
Set it to `false` if you want to use the action as a filter.
51+
52+
### `missing-versions-label`
53+
54+
Label to add when missing or outdated versions are found.
55+
56+
## Outputs
57+
58+
### `found`
59+
60+
Packages and version numbers found. It'll be formatted like `@react-navigation/stack@5.1.2,@react-navigation/native@5.0.5`.
61+
62+
### `outdated`
63+
64+
Packages with outdated versions and their latest versions. It'll be formatted like `@react-navigation/stack@5.1.2,@react-navigation/native@5.0.5`.
65+
66+
### `missing`
67+
68+
Packages missing version numbers. It'll be formatted like `@react-navigation/stack,@react-navigation/native`.

action.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: 'Check versions'
2+
description: 'Check for missing or outdated versions of packages mentioned in the issue'
3+
author: 'Satyajit Sahoo'
4+
5+
branding:
6+
icon: 'alert-triangle'
7+
color: 'orange'
8+
9+
inputs:
10+
github-token:
11+
description: The `GITHUB_TOKEN` secret.
12+
required: true
13+
packages:
14+
description: 'List of packages to check for'
15+
required: true
16+
comment:
17+
description: 'Whether to comment on the issue when missing or outdated versions are found'
18+
default: true
19+
missing-versions-label:
20+
description: 'Label to add when missing or outdated versions are found'
21+
22+
outputs:
23+
found:
24+
description: 'Packages and version numbers found'
25+
outdated:
26+
description: 'Packages with outdated versions and their latest versions'
27+
missing:
28+
description: 'Packages missing version numbers'
29+
30+
runs:
31+
using: 'node12'
32+
main: 'src/index.js'

assets/screenshot.png

75.7 KB
Loading

node_modules/.bin/which

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@actions/core/README.md

Lines changed: 146 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@actions/core/lib/command.d.ts

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@actions/core/lib/command.js

Lines changed: 78 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/@actions/core/lib/command.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)