-
Notifications
You must be signed in to change notification settings - Fork 3
Feat!: Convert action to use graphql mutation #57
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
Conversation
| @@ -1,46 +0,0 @@ | |||
| { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So package.json is being deleted. How does the project get its dependencies?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this is now just a composite action which doesn't pull any dependencies at all. Just runs bash commands in action.yml
|
|
||
| - package-ecosystem: npm # This is the correct value for yarn https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#package-ecosystem | ||
| directory: / | ||
| - package-ecosystem: 'npm' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could probably delete this, but if we ever include package.json again in the future we won't have to change dependabot settings
Problem
If committing to a fast paced repo (lots of commits) there was a frequent failure that can happen because the commit oid being committed to is not the latest.
Description of fix
By using
git ls-remote --heads origin <ref>we fetch the latest oid from the remote repository without having to pull all commits locally. This in theory should minimize failures since oid fetching occurs right before commit and with less time wasted pulling commits it should succeed more often than not.Converting to a Graphql api call instead of typescript with normal api calls simplifies the action by not having to create a tree object while committing. Reducing the chance for errors since we are only passing file contents along instead of tree structures.