-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into chore/gh-api-url
- Loading branch information
Showing
19 changed files
with
288 additions
and
36 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DEFAULT_PATH=tests |
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,13 @@ | ||
# Testing | ||
|
||
Tests written in [bashunit](https://bashunit.typeddevs.com/). | ||
|
||
Install vendor dependencies: | ||
```bash | ||
./install-dependencies.sh | ||
``` | ||
|
||
Run all tests: | ||
```bash | ||
./lib/bashunit tests | ||
``` |
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,20 @@ | ||
## What type of PR is this? (check all applicable) | ||
|
||
- [ ] Refactor | ||
- [ ] Feature | ||
- [ ] Bug Fix | ||
- [ ] Optimization | ||
- [ ] Documentation Update | ||
|
||
## Description | ||
_A brief description of the work covered in this change._ | ||
|
||
## Notes to Reviewer | ||
_If there is a particular part of the code that you need the reviewer to examine closely (e.g. some logic you are not sure about), please specify here._ | ||
|
||
## How to test | ||
_Please replace this line with instructions on how to test your changes. Use screenshots or recordings if necessary._ | ||
|
||
## Link to issues addressed | ||
- [ISSUE-XYZ](https://github.com/CodelyTV/pr-size-labeler/issues/XYZ) | ||
- [ISSUE-XYZ](https://github.com/CodelyTV/pr-size-labeler/issues/XYZ) |
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,19 @@ | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
name: Tests | ||
jobs: | ||
tests: | ||
name: "Run tests" | ||
runs-on: 'ubuntu-latest' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: "Install dependencies" | ||
run: ./install-dependencies.sh | ||
|
||
- name: "Tests" | ||
run: ./lib/bashunit |
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,3 @@ | ||
.idea/ | ||
|
||
lib/bashunit |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
|
||
## bashunit | ||
curl -s https://bashunit.typeddevs.com/install.sh | bash -s -- lib 0.10.0 |
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,5 +1,12 @@ | ||
#!/usr/bin/env bash | ||
|
||
github_actions::get_pr_number() { | ||
jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH" | ||
local -r pull_request_number=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH") | ||
|
||
if [[ "$pull_request_number" != "null" ]]; then | ||
echo "$pull_request_number" | ||
else | ||
echo "Not a pull request event" | ||
exit 1 | ||
fi | ||
} |
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"url": "https://api.github.com/repos/test/pulls/123", | ||
"number": 123, | ||
"state": "open", | ||
"locked": false, | ||
"title": "YOLO PR", | ||
"user": {}, | ||
"body": "", | ||
"created_at": "2024-04-12T17:08:32Z", | ||
"updated_at": "2024-04-12T20:03:46Z", | ||
"closed_at": null, | ||
"merged_at": null, | ||
"merge_commit_sha": "9ec1fc67bbc7bd9151270", | ||
"assignee": null, | ||
"assignees": [], | ||
"requested_reviewers": [], | ||
"requested_teams": [], | ||
"labels": [], | ||
"milestone": null, | ||
"draft": false, | ||
"head": {}, | ||
"base": {}, | ||
"author_association": "CONTRIBUTOR", | ||
"auto_merge": null, | ||
"active_lock_reason": null, | ||
"merged": false, | ||
"mergeable": true, | ||
"rebaseable": false, | ||
"mergeable_state": "blocked", | ||
"merged_by": null, | ||
"comments": 4, | ||
"review_comments": 0, | ||
"maintainer_can_modify": false, | ||
"commits": 9, | ||
"additions": 173, | ||
"deletions": 1, | ||
"changed_files": 4 | ||
} |
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,74 @@ | ||
[ | ||
{ | ||
"filename": ".editorconfig", | ||
"additions": 9, | ||
"deletions": 0, | ||
"changes": 9 | ||
}, | ||
{ | ||
"filename": ".github/workflows/ci.yml", | ||
"additions": 17, | ||
"deletions": 0, | ||
"changes": 17 | ||
}, | ||
{ | ||
"filename": "asdasdasd.lock", | ||
"additions": 1188, | ||
"deletions": 0, | ||
"changes": 1188 | ||
}, | ||
{ | ||
"filename": "entrypoint.sh", | ||
"additions": 4, | ||
"deletions": 4, | ||
"changes": 8 | ||
}, | ||
{ | ||
"filename": "src/ensure.sh", | ||
"additions": 4, | ||
"deletions": 4, | ||
"changes": 8 | ||
}, | ||
{ | ||
"filename": "src/github.sh", | ||
"additions": 89, | ||
"deletions": 76, | ||
"changes": 165 | ||
}, | ||
{ | ||
"filename": "src/github_actions.sh", | ||
"additions": 1, | ||
"deletions": 1, | ||
"changes": 2 | ||
}, | ||
{ | ||
"filename": "src/inner.lock", | ||
"additions": 1188, | ||
"deletions": 0, | ||
"changes": 1188 | ||
}, | ||
{ | ||
"filename": "src/labeler.sh", | ||
"additions": 48, | ||
"deletions": 48, | ||
"changes": 96 | ||
}, | ||
{ | ||
"filename": "src/log.sh", | ||
"additions": 17, | ||
"deletions": 0, | ||
"changes": 17 | ||
}, | ||
{ | ||
"filename": "src/main.sh", | ||
"additions": 34, | ||
"deletions": 23, | ||
"changes": 57 | ||
}, | ||
{ | ||
"filename": "src/misc.sh", | ||
"additions": 10, | ||
"deletions": 14, | ||
"changes": 24 | ||
} | ||
] |
Oops, something went wrong.