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

Version Check Not Detecting Change Past 20 Commits #287

Open
ayeung-godaddy opened this issue May 15, 2024 · 4 comments
Open

Version Check Not Detecting Change Past 20 Commits #287

ayeung-godaddy opened this issue May 15, 2024 · 4 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed status: pinned Should not be labeled as stale type: feature New feature or feature request

Comments

@ayeung-godaddy
Copy link

Based on reading the source code, I understand that once there are more than 20+ commits, the GHA is limited and may not check all commits for a package.json version change.

However, in the code, if a commit message contains the release version and it matches the packageObj.version then it should find and detect the change (here).

For context, these are the settings of the action when I run it:

Actions.versionCheck({
        name: 'Check for Version Change',
        id: 'check-version-change',
        with: {
          'diff-search': 'true',
          'file-name': `projects/${projectName}/package.json`,
          'token': '${{ secrets.GITHUB_TOKEN }}'
        }
      }),

So, since there are 20+ commits, it is not checking every commit for a package.json version update which is expected. But even when I do a later commit with a semver version in the message, it doesn't detect it. Is that expected too??

Proposed solution:
Can commits somehow be reversed so that the most recent 20 commits are checked instead of the first 20? Or can there be a flag to allow this to happen? I'm not entirely sure where this change would go (here maybe?).

@ayeung-godaddy ayeung-godaddy added the type: question Further information is requested label May 15, 2024
@EndBug EndBug added type: feature New feature or feature request good first issue Good for newcomers status: pinned Should not be labeled as stale and removed type: question Further information is requested labels May 15, 2024
@EndBug
Copy link
Owner

EndBug commented May 15, 2024

Heyy, that's actually a nice point.
I don't remember the reason why it wasn't so trivial to do that, maybe the commits are paginated or something. But I see in the source code that at the time i put a warning mentioning a limit with GitHub's webhooks, so idk

I'll keep this pinned though!

@EndBug EndBug added the help wanted Extra attention is needed label May 15, 2024
@ayeung-godaddy
Copy link
Author

@EndBug Awesome thank you! Just wondering, how do you test your changes on this GHA? If I were to propose some changes and create a PR, do I need to use my local changes in another PR to test that my changes are working as expected?

@ayeung-godaddy
Copy link
Author

#288

@EndBug
Copy link
Owner

EndBug commented May 17, 2024

How do you test your changes on this GHA? If I were to propose some changes and create a PR, do I need to use my local changes in another PR to test that my changes are working as expected?

Heyy @ayeung-godaddy, TLDR: afaik, yes 😅

I now have my own repo set up to test my actions, and I usually run them on that one.
I know that there are some tools that are able to run GitHub Actions locally, mocking event payloads, but they didn't exist when I first started developing actions, and I've never really took the time to look into them.

It would be nice to have a proper CI, but for the time being I have to manually test the changes :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed status: pinned Should not be labeled as stale type: feature New feature or feature request
Projects
None yet
Development

No branches or pull requests

2 participants