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

add file for automated library list #235

Merged
merged 1 commit into from
Jan 3, 2025

Conversation

FoamyGuy
Copy link
Contributor

@FoamyGuy FoamyGuy commented Jan 3, 2025

adafruit/adabot#392 was intending to make adabot automatically generate the list of libraries for this repo like it does the Adafruit one. This did not work successfully when it ran in the actions cron task due to the list file not having been git added to the repo: https://github.com/adafruit/adabot/actions/runs/12593054193/job/35098547373#step:7:16167

It doesn't appear that the Adafruit list is ever git added either though and it does succeed. I think it's due to using the -a flag when it commits here: https://github.com/adafruit/adabot/blob/main/adabot/circuitpython_bundle.py#L359. Because the file exists already and gets modified by the task this commit picks up the change with the -a flag.

This PR adds an empty file to get modified by the task so that the same commit function will be able to pick up the changes for the community bundle list.

As noted in the Adabot PR, ultimately we can change this file to just use the existing name rather than this one with "auto" in it. But I felt it was safer to do it in a new file first then once it's verified to be listing and creating the file correctly swap the name over to the old one and get rid of the "auto" one.

@FoamyGuy FoamyGuy requested a review from a team January 3, 2025 17:22
Copy link
Contributor

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

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

This makes sense, but could -a also be used for the Community bundle?

Copy link
Member

@jepler jepler left a comment

Choose a reason for hiding this comment

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

we can see if this works.

I don't know how the process works overall; can we put some placeholder text here like <!-- This file is automatically populated by adabot, do not edit directly--> or would that interfere with the process?

@FoamyGuy FoamyGuy merged commit 81372a7 into adafruit:main Jan 3, 2025
1 check passed
@FoamyGuy
Copy link
Contributor Author

FoamyGuy commented Jan 3, 2025

could -a also be used for the Community bundle?

@danh -a is already used also for the community bundle, both bundles are handled by the same function. But my understanding is -a only automatically picks up modifications and deletions. Since this file didn't exist before it was technically a creation not a modification and thus was missed by -a. By adding the empty file from this PR I believe it should count as a modification and get picked up next time. The difference to the Adafruit bundle is just that it's modifying an existing file, while this was creating a new one (but now will be modifying this blank one).

can we put some placeholder text here like <!-- This file is automatically populated by adabot, do not edit directly-->

@jepler I think we can, there is already a header section that gets generated with some information and links. I believe we should be able to add this to it. I'll add that when we make the swap over to the old file name. I think there is a learn guide page that discusses adding new libraries to the md file list. I'll make a note to find and update that as well to reflect the fact that it'll be automatic moving forward.

@dhalbert
Copy link
Contributor

dhalbert commented Jan 3, 2025

@FoamyGuy I misread the code and thought it was doing a git add -a, not just a git commit -a. I do the former when I want to pick up new files.

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.

3 participants