Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support yml and yaml by matching before @ #37

Conversation

AlexanderOMara
Copy link
Contributor

@AlexanderOMara AlexanderOMara commented May 18, 2024

The new parentWorkflowPath regex assumes .yml extension and errors out on .yaml extension, a breaking regression in version 2.0.2. I think matching before @ is safer (library.js also does it that way).


Run gautamkrishnar/keepalive-workflow@v2
/home/runner/work/_actions/gautamkrishnar/keepalive-workflow/v2/dist/index.js:23040
      const parentWorkflowPath = process.env.GITHUB_WORKFLOW_REF.match(/^(.*\.yml)/)[1];
                                                                                    ^

TypeError: Cannot read properties of null (reading '1')
    at /home/runner/work/_actions/gautamkrishnar/keepalive-workflow/v2/dist/index.js:23040:85
    at new Promise (<anonymous>)
    at /home/runner/work/_actions/gautamkrishnar/keepalive-workflow/v2/dist/index.js:23039:21
    at Array.forEach (<anonymous>)
    at Object.<anonymous> (/home/runner/work/_actions/gautamkrishnar/keepalive-workflow/v2/dist/index.js:23038:17)
    at Module._compile (node:internal/modules/cjs/loader:1241:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Module._load (node:internal/modules/cjs/loader:938:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)

@gautamkrishnar
Copy link
Owner

@AlexanderOMara Whoops i never knew Github started supporting yaml as well. thanks for the fix.

@gautamkrishnar gautamkrishnar merged commit 10f14a9 into gautamkrishnar:version2 May 18, 2024
@gautamkrishnar
Copy link
Owner

@all-contributors please add @AlexanderOMara for code

Copy link
Contributor

@gautamkrishnar

I've put up a pull request to add @AlexanderOMara! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants