Skip to content

Commit 81a24b8

Browse files
🩹 [Patch]: Add a 'test' for event info (#25)
## Description This pull request includes changes to the testing workflow and the addition of a new script file to exemplify the process of gathering GitHub event and runner information. Changes to the testing workflow: * [`.github/workflows/TestWorkflow.yml`](diffhunk://#diff-242a265d6d6bfff6094c9285345022d0e6d7ddde58504dfc80249fafbd89ba2cL63-R63): Updated the `ActionTestWithScript` job to use the new `info.ps1` script for exemplify how to gather GitHub event and runner information. Addition of new script: * [`tests/info.ps1`](diffhunk://#diff-81ccec2f86ef88b1c1634ae2b230c847a0ee82a64b45fd3737445547e797a4edR1-R9): Added a new PowerShell script that requires the GitHub module and logs GitHub event and runner data in a formatted list. ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] 📖 [Docs] - [ ] 🪲 [Fix] - [x] 🩹 [Patch] - [ ] ⚠️ [Security fix] - [ ] 🚀 [Feature] - [ ] 🌟 [Breaking change] ## Checklist <!-- Use the check-boxes [x] on the options that are relevant. --> - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas
1 parent 3dbded6 commit 81a24b8

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

.github/workflows/TestWorkflow.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,7 @@ jobs:
6060
with:
6161
Debug: true
6262
Verbose: true
63-
Script: |
64-
LogGroup 'Get-GitHubZen' {
65-
Get-GitHubZen
66-
}
67-
68-
LogGroup 'Get-GitHubViewer' {
69-
Get-GitHubViewer -Fields name, login, id, databaseID
70-
}
63+
Script: . '.\tests\info.ps1'
7164

7265
ActionTestCommands:
7366
name: Commands + Outputs

tests/info.ps1

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#Requires -Modules GitHub
2+
3+
LogGroup ' - Event Info' {
4+
Get-GithubEventData | Format-List
5+
}
6+
7+
LogGroup ' - Runner Info' {
8+
Get-GithubRunnerData | Format-List
9+
}

0 commit comments

Comments
 (0)