-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support ignore deletions with "ignore_line_deletions" param (#71)
* Support ignore deletions with "ignore_file_deletions" param Test files_to_ignore code path Tweak the variable type Correct bad logic in the file ignore block Debug More debugging More debugging Fingers crossed Another try Last try Lets see if this one does it Testing again More tests More testing Last test Wait, I might be onto something Put some changes back Fixes Whoops Walk back yml test * Rename config variable to be ignore_line_deletions * Add and update tests * Update action.yml to provided more consistent desc. Co-authored-by: Javier Ferrer González <[email protected]> * Delete redundant helper function * Fix parse error in action.yml --------- Co-authored-by: Javier Ferrer González <[email protected]>
- Loading branch information
1 parent
1cc5389
commit f2aafc4
Showing
12 changed files
with
133 additions
and
40 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
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 | ||
} |
File renamed without changes.
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
1 change: 1 addition & 0 deletions
1
tests/snapshots/github_test_sh.test_should_count_changes.snapshot
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 @@ | ||
174 |
1 change: 1 addition & 0 deletions
1
tests/snapshots/github_test_sh.test_should_count_changes_ignore_deletions.snapshot
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 @@ | ||
173 |
1 change: 1 addition & 0 deletions
1
tests/snapshots/github_test_sh.test_should_ignore_files_with_glob_ignore_deletions.snapshot
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 @@ | ||
224 |