Skip to content

Add pr merge doc updater #117

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

Merged
merged 6 commits into from
Oct 29, 2024
Merged

Add pr merge doc updater #117

merged 6 commits into from
Oct 29, 2024

Conversation

AndrewBKang
Copy link
Contributor

Add an AI sublayer_documentation updater github action.
Runs when a PR is merged to Sublayer main.

@swerner
Copy link
Contributor

swerner commented Oct 22, 2024

Been thinking about these github-related sublayer actions and how they're different from the ones in the sublayer_actions repo and the ones used elsewhere. I do think we should standardize on doing these things one particular way where we use the octokit api rather than shelling out directly to the filesystem.

I think what we probably want to do is package that repo up as a gem and then have the ability to require different sub-sections of the actions for what you're trying to do...so something like:

gem "sublayer"
gem "sublayer_actions/github"

or

require "sublayer_actions/github"

I find myself copy/pasting these files all over the place and finding a bug in one means having to figure out all the places we've done it that way in the past...

@swerner
Copy link
Contributor

swerner commented Oct 22, 2024

and actually thinking...maybe a pattern similar to what devise offers...where you can rely on the controllers/views/etc if you want to use the defaults, but if you want to change them, it'll write the files out for you in your project for you to customize...

@@ -0,0 +1,13 @@
class GithubCreateBranchAction
Copy link
Contributor

Choose a reason for hiding this comment

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

I know there's not much plumbing there just yet, but should still make sure to make it a subclass of Sublayer::Actions::Base as we'll be adding logging and other things to the base class over time and would want these to all work similarly

@@ -0,0 +1,49 @@
class GithubAddOrModifyFileAction
Copy link
Contributor

Choose a reason for hiding this comment

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

I know there's not much plumbing there just yet, but should still make sure to make it a subclass of Sublayer::Actions::Base as we'll be adding logging and other things to the base class over time and would want these to all work similarly

Copy link
Contributor

@swerner swerner left a comment

Choose a reason for hiding this comment

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

looks great!

@AndrewBKang AndrewBKang merged commit 7740f53 into main Oct 29, 2024
1 check passed
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.

2 participants