Skip to content
New issue

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

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

Already on GitHub? # to your account

replace the default elapsed time value of 50 with 45 #45

Conversation

Han-Joon-Hyeok
Copy link
Contributor

Summary

Replaced the default elpased time value of 50 with 45 to align it with action.yml.

Background

I have just read through the entire code to understand how it works.

And I found that the default elapsed time value in the code is not aligned with action.yml default value.

The time_elapsed default value is defined as 45 in action.yml.

# action.yml

inputs:
  ...
  time_elapsed:
    description: "Time elapsed from the last commit to trigger a new automated commit or API call (in days)"
+   default: "45"
    required: false

But the timeElapsed default value is defined as 50 in library.js.

# library.js

const APIKeepAliveWorkflow = (githubToken,
                              {
                                workflowFile = null,
                                apiBaseUrl= (
                                  (!!process.env.GITHUB_API_URL) ?
                                    process.env.GITHUB_API_URL : 'https://api.github.com'
                                ),
+                               timeElapsed = 50,
                                autoWriteCheck = false
                              } = {}) => {

It confuses me as to which one is correct.

After searching git commit logs, I can confirm that 45 is the default value. (#36)

Although it doesn't affect the running process, I think it can confuse people who read the code.


Thanks for developing such a great github actions!

@gautamkrishnar
Copy link
Owner

Thanks @Han-Joon-Hyeok. Great find 😄

@gautamkrishnar gautamkrishnar changed the title ✏️ chore: Replace the default elapsed time value of 50 with 45 replace the default elapsed time value of 50 with 45 Aug 22, 2024
@gautamkrishnar gautamkrishnar merged commit bb2769e into gautamkrishnar:version2 Aug 22, 2024
@Han-Joon-Hyeok Han-Joon-Hyeok deleted the chore/replace-the-default-elapsed-time-value branch August 22, 2024 07:22
@gautamkrishnar
Copy link
Owner

@all-contributors add @Han-Joon-Hyeok for code

Copy link
Contributor

@gautamkrishnar

I've put up a pull request to add @Han-Joon-Hyeok! 🎉

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

Successfully merging this pull request may close these issues.

2 participants