SomethingGeneric / cfdydns

Cloudflare dydns python thing
Apache License 2.0
0 stars 0 forks source link

Sweep: create a github action to format check all code with the black formatter #1

Open SomethingGeneric opened 1 year ago

SomethingGeneric commented 1 year ago

Additionally, it would be beneficial for the workflow to open a PR if the formatter makes changes to any files.

sweep-ai[bot] commented 1 year ago

Here's the PR! https://github.com/SomethingGeneric/cfdydns/pull/3.

⚡ Sweep Free Trial: I used GPT-3.5 to create this ticket. You have 0 GPT-4 tickets left for the month and 0 for the day. For more GPT-4 tickets, visit our payment portal.To get Sweep to recreate this ticket, leave a comment prefixed with "sweep:" or edit the issue.


Step 1: 🔍 Code Search

I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.

Some code snippets I looked at (click to expand). If some file is missing from here, you can mention the path in the ticket description. https://github.com/SomethingGeneric/cfdydns/blob/b22a60d5a1ca0dce11ac7fbe42e086b6fae1ee47/LICENSE#L1-L201 https://github.com/SomethingGeneric/cfdydns/blob/b22a60d5a1ca0dce11ac7fbe42e086b6fae1ee47/README.md#L1-L10

Step 2: 🧐 Snippet Analysis

From looking through the relevant snippets, I decided to make the following modifications:

File Path Proposed Changes
.github/workflows/main.yml Add a new GitHub action that runs the black formatter on all code files. Also, add a step to open a pull request if the formatter makes changes to any files.

Step 3: 📝 Planning

I have created a plan for writing the pull request. I am now working my plan and coding the required changes to address this issue. Here is the planned pull request:

Add GitHub action for code formatting and auto PR creation sweep/add-github-action

Description

This PR adds a new GitHub action to the repository that runs the black formatter on all code files. It also includes a step to automatically open a pull request if the formatter makes changes to any files.

Summary of Changes

  • Added a new GitHub action in .github/workflows/main.yml to run the black formatter on all code files.
  • Added a step in the GitHub action to open a pull request if the formatter makes changes to any files.

Please review and merge this PR to enable automatic code formatting and PR creation in the repository.


Step 4: ⌨️ Coding

File Instructions Progress
.github/workflows/main.yml Add a new GitHub action that runs the black formatter on all code files. Also, add a step to open a pull request if the formatter makes changes to any files. ✅ Commit 7a54afe I have finished coding the issue. I am now reviewing it for completeness.

Step 5: 🔁 Code Review

Here are the my self-reviews of my changes at sweep/add-github-action.

Here is the 1st review

No changes required. The implementation of the GitHub Actions workflow in the .github/workflows/main.yml file for performing a format check on the code looks good. Well done!

I finished incorporating these changes.


To recreate the pull request, leave a comment prefixed with "sweep:" or edit the issue. Join Our Discord

SomethingGeneric commented 1 year ago

Can you revise the steps to use the v3 of both?