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 actions to automatically bump man page month #3748
Conversation
At the beginning of every month, the CI breaks as it has a check that makes sure that man pages stay in sync with their sources. Therefore, someone (David) has to manually update the man pages every month by running `bin/rake man:build`. With this, having an actions doing this, can help save manual work. Closes: rubygems#3582 Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>
Hi @deivid-rodriguez, I am not sure, but I hope this helps 😅 |
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.
This is so awesome, I'm really excited about this!! 🎉
This commit fixes the workflow in various ways: - Don't rely on external action. - Set `working_directory:` wherever needed. - Install `ronn` instead of running `rake setup`. - Use `ruby-version:` as 2.7.1. - Set `timeout-minutes:` to 15. - Drop `push` part, only scheduling part is needed. - Change author to "The Bundler Bot". Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>
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.
This looks good, but we could try it first. You can temporarily enable Github Actions in your fork, and then add
`on:
push:
branches:
- man-page-issue
Then once you push, the workflow should trigger. Everything should run just fine, except for the git push which I'm uncertain whether it will succeed or not.
Could you try it?
|
Of course. Shall do! :) |
|
@deivid-rodriguez, works like a charm: |
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.
Indeed, thanks! Let me just double check that we can push to master directly in this repo, and that other maintainers are ok with it, and I'll merge it! Thanks so much!!
|
@deivid-rodriguez sorry, I think your wrong permissions were my fault. Fixed! There is nothing blocking pushes to master, just a requirement that tests pass to allow merges. |
|
No problem, thanks! I have proper permissions now :) So, you're ok with this @indirect? By the way, I noticed that the "require status checks to pass" is indeed checked, but no specific checks are selected, so that's essentially the same as not being checked 😅. I'll fix it! |
|
@deivid-rodriguez yes, this seems good! I thought "require checks to pass" would allow if tests never ran, but block if a test failed? But maybe not. 😅 |
|
I believe the way it works is it prevent merges unless all of the status checks checked in the list available below pass. But since we have none checked, I guess it always lets you merge. From what I recall from other repos, when merges are prevented, either the Merge button is disabled, or displayed in red (if "allow administrators to override these requirements" is checked). I think this behaviour is consistent with what I see in #3758, for example. |
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.
Thanks @utkarsh2102! Let's try this!
|
@indirect I just merged a PR with failing status checks: #3762, just to verify this (and because the CI failure was clearly unrelated, and on an entry that shouldn't actually be required). It indeed merged without issues. May I go ahead and check the proper boxes in our configuration to prevent merging PRs with failed required checks? |
|
@deivid-rodriguez yes! go for it. we probably should have checked those boxes when we stopped using Bors 😬 |
|
Indeed! Better late than never though :) |
|
Done! 👍 |
|
Funny enough, enabling these checks yesterday broke the first run of this automated task today: https://github.com/rubygems/rubygems/runs/824703487?check_suite_focus=true. I believe you can whitelist certain users to be able to commit directly to protected branches, so it probably makes sense to use that feature with |
|
Actually, from reading what the option does, I think it's not going to work:
So we'll want to either disable these checks again or do something different like creating a PR instead of pushing directly to master. |
Aw, too bad :/
Of course, this will be a single actions, but probably we'll have to rely on some external actions. |
|
Hahaha, only today I was rebasing my branches and I found this: utkarsh2102@fda7273 The Bundler Bot at least pushed to my master for bumping the man-page month and it worked alright :P |
|
Hi @utkarsh2102! That would be awesome indeed. As a matter of fact, having some sort of "Merge after CI passes" through an action would be useful in general, maybe by tagging the PR with a label, or commenting something specific. We used to have something similar back when we used bors-ng, so that commenting |
|
Aha, I see! |
At the beginning of every month, the CI breaks as it has a check that makes sure that man pages stay in sync with their sources.
Therefore, someone (David) has to manually update the man pages every month by running
bin/rake man:build.With this, having actions doing this can help save manual work.
Closes: #3582
Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>
Tasks:
I will abide by the code of conduct.