File tree Expand file tree Collapse file tree 4 files changed +17
-10
lines changed Expand file tree Collapse file tree 4 files changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
5
5
Generated by [ ` auto-changelog ` ] ( https://github.com/CookPete/auto-changelog ) .
6
6
7
- #### [ v1.0.1 ] ( https://github.com/Contrast-Security-OSS/actionbot/commit/fa95c969a50f6c331ec8ef19580fb9b8521851ca...https://github.com/Contrast-Security-OSS/actionbot/pull/4/commits/5f6c36987c9e39b866fd3b7aeed4203aeedb6265 )
7
+ #### [ v1.0.3 ] ( https://github.com/Contrast-Security-OSS/actionbot/compare/v1.0.0...v1.0.3 )
8
8
9
9
- Bump eslint-plugin-github from 5.1.8 to 6.0.0 [ ` #1 ` ] ( https://github.com/Contrast-Security-OSS/actionbot/pull/1 )
10
10
- Migration build [ ` #3 ` ] ( https://github.com/Contrast-Security-OSS/actionbot/pull/3 )
Original file line number Diff line number Diff line change @@ -39024,11 +39024,16 @@ function run(context) {
39024
39024
});
39025
39025
}
39026
39026
else {
39027
- // Load up the github policy list
39027
+ // Correctly extract the file path from the policyUrl
39028
+ const filePath = policyUrl
39029
+ .replace("https://github.com/", "")
39030
+ .split("/")
39031
+ .slice(4) // Start after 'blob/main'
39032
+ .join("/");
39028
39033
const response = yield client.rest.repos.getContent({
39029
39034
owner: github.context.repo.owner,
39030
39035
repo: github.context.repo.repo,
39031
- path: policyUrl.replace("https://github.com/", "").split("/").slice(2).join("/"),
39036
+ path: filePath, // Use the corrected file path
39032
39037
});
39033
39038
if (response.data && "content" in response.data) {
39034
39039
const content = Buffer.from(response.data.content, "base64").toString("utf-8");
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " actionbot" ,
3
- "version" : " 1.0.2 " ,
3
+ "version" : " 1.0.3 " ,
4
4
"private" : true ,
5
5
"description" : " Github Action Policy Checker as a Github Action" ,
6
6
"main" : " lib/index.js" ,
Original file line number Diff line number Diff line change @@ -171,15 +171,17 @@ async function run(context: typeof github.context): Promise<void> {
171
171
// Handle the error appropriately (e.g., throw an error, set a default policy)
172
172
} ) ;
173
173
} else {
174
- // Load up the github policy list
174
+ // Correctly extract the file path from the policyUrl
175
+ const filePath = policyUrl
176
+ . replace ( "https://github.com/" , "" )
177
+ . split ( "/" )
178
+ . slice ( 4 ) // Start after 'blob/main'
179
+ . join ( "/" ) ;
180
+
175
181
const response = await client . rest . repos . getContent ( {
176
182
owner : github . context . repo . owner ,
177
183
repo : github . context . repo . repo ,
178
- path : policyUrl
179
- . replace ( "https://github.com/" , "" )
180
- . split ( "/" )
181
- . slice ( 2 )
182
- . join ( "/" ) ,
184
+ path : filePath , // Use the corrected file path
183
185
} ) ;
184
186
185
187
if ( response . data && "content" in response . data ) {
You can’t perform that action at this time.
0 commit comments