Include table definition in Ruby script
What changes are you introducing?
It moves some steps from manual to a little bit longer script that's already copied verbatim anyway.
Why are you introducing these changes? (Explanation, links to references, issues, etc.)
This reduces the number of steps a user needs to take.
Anything else to add? (Considerations, potential downsides, alternative solutions you have explored, etc.)
The whole procedure is ugly and should be replaced with something else native to Foreman but that's out of scope for this PR.
Contributor checklists
- [x] I am okay with my commits getting squashed when you merge this PR.
- [x] I am familiar with the contributing guidelines.
Please cherry-pick my commits into:
- [ ] Foreman 3.17/Katello 4.19
- [ ] Foreman 3.16/Katello 4.18 (Satellite 6.18)
- [ ] Foreman 3.15/Katello 4.17
- [ ] Foreman 3.14/Katello 4.16 (Satellite 6.17; orcharhino 7.4)
- [ ] Foreman 3.13/Katello 4.15 (EL9 only)
- [ ] Foreman 3.12/Katello 4.14 (Satellite 6.16; orcharhino 7.2 on EL9 only; orcharhino 7.3)
- [ ] Foreman 3.11/Katello 4.13 (orcharhino 6.11 on EL8 only; orcharhino 7.0 on EL8+EL9; orcharhino 7.1 with Leapp)
- [ ] Foreman 3.10/Katello 4.12
- [ ] Foreman 3.9/Katello 4.11 (Satellite 6.15; orcharhino 6.8/6.9/6.10)
- We do not accept PRs for Foreman older than 3.9.
Summary by Sourcery
Documentation:
- Clarify the procedure for creating a complete permission table by expanding the Ruby script usage to cover additional manual steps.
Reviewer's guide (collapsed on small PRs)
Reviewer's Guide
Extends the existing Ruby-based procedure for creating a complete permission table so that the script itself now includes the table definition, reducing the manual steps required from the user.
File-Level Changes
| Change | Details | Files |
|---|---|---|
| Inline the permission table definition into the Ruby script used in the documentation procedure, streamlining the manual workflow. |
|
guides/common/modules/proc_creating-a-complete-permission-table.adoc |
Tips and commands
Interacting with Sourcery
- Trigger a new review: Comment
@sourcery-ai reviewon the pull request. - Continue discussions: Reply directly to Sourcery's review comments.
- Generate a GitHub issue from a review comment: Ask Sourcery to create an
issue from a review comment by replying to it. You can also reply to a
review comment with
@sourcery-ai issueto create an issue from it. - Generate a pull request title: Write
@sourcery-aianywhere in the pull request title to generate a title at any time. You can also comment@sourcery-ai titleon the pull request to (re-)generate the title at any time. - Generate a pull request summary: Write
@sourcery-ai summaryanywhere in the pull request body to generate a PR summary at any time exactly where you want it. You can also comment@sourcery-ai summaryon the pull request to (re-)generate the summary at any time. - Generate reviewer's guide: Comment
@sourcery-ai guideon the pull request to (re-)generate the reviewer's guide at any time. - Resolve all Sourcery comments: Comment
@sourcery-ai resolveon the pull request to resolve all Sourcery comments. Useful if you've already addressed all the comments and don't want to see them anymore. - Dismiss all Sourcery reviews: Comment
@sourcery-ai dismisson the pull request to dismiss all existing Sourcery reviews. Especially useful if you want to start fresh with a new review - don't forget to comment@sourcery-ai reviewto trigger a new review!
Customizing Your Experience
Access your dashboard to:
- Enable or disable review features such as the Sourcery-generated pull request summary, the reviewer's guide, and others.
- Change the review language.
- Add, remove or edit custom review instructions.
- Adjust other review settings.
Getting Help
- Contact our support team for questions or feedback.
- Visit our documentation for detailed guides and information.
- Keep in touch with the Sourcery team by following us on X/Twitter, LinkedIn or GitHub.
The PR preview for b80dddbe77f3355454cf60e2a69fdae34a2bc890 is available at theforeman-foreman-documentation-preview-pr-4493.surge.sh
The following output files are affected by this PR:
- Administering_Project/index-foreman-deb.html
- Administering_Project/index-foreman-el.html
- Administering_Project/index-katello.html
- Administering_Project/index-orcharhino.html
- Administering_Project/index-satellite.html
- Project_API/index-foreman-deb.html
- Project_API/index-foreman-el.html
- Project_API/index-katello.html
- Project_API/index-orcharhino.html
- Project_API/index-satellite.html
QA
Tested locally :heavy_check_mark:
$ cat test_me.rb
#!/usr/bin/env ruby
result = "hello\n"
f = File.open('/tmp/table.html', 'w')
f.write("<table border=\"1\"><tr><td>Permission name</td><td>Actions</td><td>Resource type</td></tr>\n")
f.write(result)
f.write("</table>\n")
$ ./test_me.rb
$ cat /tmp/table.html
<table border="1"><tr><td>Permission name</td><td>Actions</td><td>Resource type</td></tr>
hello
</table>