-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from rsb-23/develop
PR comment token fix
- Loading branch information
Showing
11 changed files
with
86 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# actions/check-typo | ||
|
||
This Github Action uses AI to find typos and grammatical errors in PR changes. | ||
|
||
## Usage | ||
Refer [test.yml](./.github/workflows/test.yml) | ||
```yaml | ||
- name: Check typos in data files | ||
uses: actions/check-diff-typo@v1 | ||
with: | ||
token: ${{ secrets.PAT }} | ||
files: | | ||
tests/file.txt | ||
tests/file.json | ||
GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,8 @@ | ||
import os | ||
import tempfile | ||
|
||
from src.spell_check import main | ||
|
||
|
||
def run(): | ||
if "GITHUB_OUTPUT" not in os.environ: | ||
from dotenv import load_dotenv | ||
|
||
load_dotenv() | ||
with tempfile.NamedTemporaryFile(mode="w+", delete_on_close=False) as f: | ||
os.environ["GITHUB_OUTPUT"] = f.name | ||
main() | ||
from dotenv import load_dotenv | ||
|
||
load_dotenv() | ||
|
||
if __name__ == "__main__": | ||
run() | ||
from src.spell_check import main | ||
|
||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
from src.spell_check import main | ||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
groq==0.13.0 | ||
requests~=2.32.3 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import os | ||
|
||
|
||
def get_env(x): | ||
return os.environ[x] | ||
|
||
|
||
GROQ_API_KEY = get_env("GROQ_API_KEY") | ||
PAT_TOKEN = get_env("token") | ||
|
||
REPO = get_env("GITHUB_REPOSITORY") | ||
PR_BASE = get_env("PR_BASE") | ||
PR_NO = get_env("PR_NO") | ||
INPUT_FILES = [*map(str.strip, get_env("INPUT_FILES").splitlines())] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"fruit1": "pineaple", "friut2": "gauva"} | ||
{"fruit1": "pineaple", "friut2": "graep"} |