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

fix(workflow): add empty commit if no activity has been detected for over 50 days #115

Merged
merged 6 commits into from Mar 28, 2024

Conversation

aeswibon
Copy link
Contributor

@aeswibon aeswibon commented Mar 28, 2024

Bug Fix

Proposed Changes

action.yml Outdated Show resolved Hide resolved
.github/workflows/node.js.yml Outdated Show resolved Hide resolved
action.yml Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
package.json Show resolved Hide resolved
@aeswibon aeswibon requested a review from tuunit March 28, 2024 14:29
.github/CODEOWNERS Outdated Show resolved Hide resolved
.github/workflows/node.js.yml Show resolved Hide resolved
Copy link
Collaborator

@tuunit tuunit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fails when trying to execute the commit empty method.

index.js Outdated Show resolved Hide resolved
pnpm-lock.yaml Outdated Show resolved Hide resolved
@aeswibon
Copy link
Contributor Author

Found the solution.
image
image
If I do this, then its working.

@tuunit
Copy link
Collaborator

tuunit commented Mar 28, 2024

@aeswibon please give my changes a quick review :)

@aeswibon
Copy link
Contributor Author

Sure

@tuunit
Copy link
Collaborator

tuunit commented Mar 28, 2024

Sure

Unfortunately, my test with a faked history does not work:

My test repository has been updated in september (difference in days is 187) but I still don't get an empty commit after this is executed:
https://github.com/tuunit/github-activity-testing/actions/runs/8470600101/job/23208664268

@tuunit
Copy link
Collaborator

tuunit commented Mar 28, 2024

I activated debugging in GitHub Actions and got the following:

ℹ  info      Found no activity.
##[debug]Difference in days: NaN
✔  success   No PullRequest/Issue/IssueComment/Release events found. Leaving README unchanged with previous activity

@aeswibon
Copy link
Contributor Author

I updated the script, and am getting the correct response.
image
image
image

@aeswibon aeswibon requested a review from tuunit March 28, 2024 16:57
@tuunit
Copy link
Collaborator

tuunit commented Mar 28, 2024

@aeswibon thanks for your patience and effort in testing it. Testing automation that is based on git history changes is always a bit tricky.

tuunit
tuunit previously approved these changes Mar 28, 2024
Copy link
Collaborator

@tuunit tuunit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM now

@tuunit tuunit changed the title fix(index): added empty commit function fix(workflow): add empty commit if no activity has been detected for over 50 days Mar 28, 2024
@tuunit tuunit merged commit df57d5c into jamesgeorge007:master Mar 28, 2024
1 check passed
@tuunit
Copy link
Collaborator

tuunit commented Mar 28, 2024

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.

Make an empty commit if 50 days have elapsed since the last commit
2 participants