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

Automatic pull request script: available modules #680

Merged
merged 26 commits into from
Sep 10, 2024

Conversation

lbarraga
Copy link
Contributor

@lbarraga lbarraga commented Sep 3, 2024

This PR proposes a script that is meant to run inside a VSC account as a cronjob.
It runs scripts/available_software/available_software.py and makes a pull request to the vsc_user_docs containing the changes.

see the README for more info

@lbarraga lbarraga changed the title Module auto pr Automatic pull request script: available modules Sep 3, 2024
@lbarraga lbarraga marked this pull request as ready for review September 3, 2024 15:58
lbarraga and others added 2 commits September 10, 2024 09:22
@boegel
Copy link
Member

boegel commented Sep 10, 2024

re-tested with my GitHub account in combination with #698, works like a charm:

@boegel boegel merged commit 958a478 into hpcugent:main Sep 10, 2024
3 checks passed
@boegel
Copy link
Member

boegel commented Sep 10, 2024

@lbarraga As discussed, we should look into how we can prevent "silly" PRs from being opened that only bump the "last updated" timestamp, since the idea here is to run this script in a daily cron job.

Let's open an issue on that in this repo as a reminder, it can be tackled in a follow-up PR.

Comment on lines +72 to +73
# Add and commit the generated files
git add .
Copy link
Member

Choose a reason for hiding this comment

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

@lbarraga To be fixed in follow-up PR that tries to prevent silly timestamp-bump-only PRs: make this a bit more strict by only staging the changes in the subdirectory where the available_software.py script generates data, to try and avoid random untracked stuff from being shoved into the PR being created:

Suggested change
# Add and commit the generated files
git add .
# add and commit (only) the files generated by the available_software.py script
git add mkdocs/docs/HPC/only/gent/available_software/

In the account that we'll use to run this script, I'll add a cron.sh and and extra README with some info in scripts/[modules_auto_pr/ for example, but that should never be added into a PR.

Another example is the file that holds the GitHub token, we really do not want to accidentally include that into a PR 🙈

That shouldn't happen, since a fresh clone is being made in a temporary directory, but we better try and avoid mistakes if more changes are being made to this script later (I can imagine us going "why do we clone from scratch if we already have a checkout of this repo, we can just copy+update that instead" in the future, for example).

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