From c207922bc4749c3d6b10c44183b05eb121678934 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Thu, 7 Sep 2023 13:06:37 +0200 Subject: [PATCH] [docs] README update on maintenance and small fixes Test Plan: This documentation update needs to be checked in these locations: https://kwk.github.io/buildbot-app/ and https://github.com/kwk/buildbot-app/. Reviewers: Pull Request: https://github.com/kwk/buildbot-app/pull/20 --- README.adoc | 36 ++-- docs/README.in.adoc | 11 +- docs/index.html | 311 +++++++++++++++-------------- docs/media/command-ebnf.svg | 2 +- docs/media/on-buildbot-comment.svg | 2 +- 5 files changed, 192 insertions(+), 170 deletions(-) diff --git a/README.adoc b/README.adoc index b945770..a821357 100644 --- a/README.adoc +++ b/README.adoc @@ -32,6 +32,11 @@ endif::[] // endif::[] // toc::[] +[IMPORTANT] +==== +THIS REPOSITORY IS NO LONGER ACTIVELY MAINTAINED. +==== + Let’s build a GitHub App that lets you control your buildbot through `/buildbot` comments on GitHub Pull Requests. @@ -70,7 +75,7 @@ Internally a command comment will be converted into this structure: *Command structure (cmd/buildbot-app/command/command.go)* -[source,go] +[source%linesnum,go] ---- // A Command represents all information about a /buildbot command type Command struct { @@ -93,7 +98,7 @@ There’s a regular expression that a string comment must match (see *Regular Rexpression (cmd/buildbot-app/command/command.go)* -[source,go] +[source%linesnum,go] ---- const ( // BuildbotCommand is the command that triggers the buildbot workflow in a @@ -156,7 +161,7 @@ The code for creating the comment is straight-forward: *Thank You! (cmd/buildbot-app/on_issue_comment_event.go)* -[source,go] +[source%linesnum,go] ---- // This comment will be used all over the place thankYouComment := fmt.Sprintf( @@ -226,7 +231,7 @@ GitHub before we check if is mergable: *Get PR and check mergability (cmd/buildbot-app/on_issue_comment_event.go)* -[source,go] +[source%linesnum,go] ---- commentUser := *event.Comment.User.Login repoOwner := *event.Repo.Owner.Login @@ -246,7 +251,7 @@ mergable: *Test: Get PR and check mergability (cmd/buildbot-app/on_issue_comment_event_test.go)* -[source,go] +[source%linesnum,go] ---- func TestOnIssueCommentEventAny(t *testing.T) { t.Run("pr not mergable", func(t *testing.T) { @@ -281,7 +286,7 @@ various places: *Server interface (cmd/buildbot-app/server.go)* -[source,go] +[source%linesnum,go] ---- // Server specifies the interface that we need to implement from the AppServer // object in order to provide a decent mock in tests. @@ -311,8 +316,8 @@ containers. [source,console] ---- $ git clone https://github.com/kwk/buildbot-app.git && cd buildbot-app -$ sudo dnf install -y direnv golang podman podman-compose buildbot pandic asciidoctor -$ gem install asciidoctor-lists +$ sudo dnf install -y direnv golang podman podman-compose buildbot pandoc asciidoctor +$ gem install asciidoctor-lists pygments.rb $ go install github.com/cespare/reflex@latest $ cat <> ~/.bashrc export PATH=\${PATH}:~/go/bin @@ -328,7 +333,8 @@ $ make app * Install tools we need/use for development locally. If this was a deployment site the only requirement is buildbot so that the github app can make a call to `buildbot try`. -* Install extension to create list of figures etc. +* Install extension to create list of figures etc. and install pygments +for source code highlighting. * Install hot-reload tool. * Make tools above available upon next source of `.bashrc`. * Reload `.bashrc` to have `direnv` and `reflex` working in your current @@ -405,17 +411,17 @@ https://docs.buildbot.net/latest/manual/configuration/services/index.html [[_list_of_code_snippets]] == List of code snippets -link:#5cb629ee-43a2-46e5-a87a-b9ec85353ef1[Listing 1. ]Command structure +link:#cd841b04-3fc5-4388-ba3c-1aca6d7f50c1[Listing 1.] Command structure (cmd/buildbot-app/command/command.go) + -link:#ad332974-235e-4d79-83b4-39fb4ce307c8[Listing 2. ]Regular +link:#39ad47a6-8c85-47c8-bf25-f65e425de282[Listing 2.] Regular Rexpression (cmd/buildbot-app/command/command.go) + -link:#5c7e7c3d-a7a1-4a3c-a029-c62f07e486ad[Listing 3. ]Thank You! +link:#5ac04254-7db6-46f2-b371-cb91339ace8e[Listing 3.] Thank You! (cmd/buildbot-app/on_issue_comment_event.go) + -link:#60e9f0e7-8474-4802-8a07-4a7ef1585327[Listing 4. ]Get PR and check +link:#bf2bda60-e550-4332-b406-c32431dde101[Listing 4.] Get PR and check mergability (cmd/buildbot-app/on_issue_comment_event.go) + -link:#ca2f0a2f-7c1a-42cd-8964-ff0a4bb5a7a7[Listing 5. ]Test: Get PR and +link:#fae37627-0f58-4a6a-adb0-d03494b5c305[Listing 5.] Test: Get PR and check mergability (cmd/buildbot-app/on_issue_comment_event_test.go) + -link:#40fcfc54-064a-49d0-96bc-c8328034c8ec[Listing 6. ]Server interface +link:#868c092a-3941-4971-b2f5-d570212c3c31[Listing 6.] Server interface (cmd/buildbot-app/server.go) + [[_todo]] diff --git a/docs/README.in.adoc b/docs/README.in.adoc index 0dd3c83..4f96e4b 100644 --- a/docs/README.in.adoc +++ b/docs/README.in.adoc @@ -2,6 +2,11 @@ include::preamble.adoc[] [.lead] +[IMPORTANT] +=========== +THIS REPOSITORY IS NO LONGER ACTIVELY MAINTAINED. +=========== + Let's build a GitHub App that lets you control your buildbot through `/buildbot` comments on GitHub Pull Requests. image::docs/media/logo/logo-round-small.png[] @@ -138,8 +143,8 @@ I'm using a Fedora Linux 37 on my local machine and for most of the containers. [source,console] ---- $ git clone https://github.com/kwk/buildbot-app.git && cd buildbot-app # <1> -$ sudo dnf install -y direnv golang podman podman-compose buildbot pandic asciidoctor # <2> -$ gem install asciidoctor-lists # <3> +$ sudo dnf install -y direnv golang podman podman-compose buildbot pandoc asciidoctor # <2> +$ gem install asciidoctor-lists pygments.rb # <3> $ go install github.com/cespare/reflex@latest # <4> $ cat <> ~/.bashrc # <5> export PATH=\${PATH}:~/go/bin @@ -152,7 +157,7 @@ $ make app # <9> ---- <1> Clone the repo. <2> Install tools we need/use for development locally. If this was a deployment site the only requirement is buildbot so that the github app can make a call to `buildbot try`. -<3> Install extension to create list of figures etc. +<3> Install extension to create list of figures etc. and install pygments for source code highlighting. <4> Install hot-reload tool. <5> Make tools above available upon next source of `.bashrc`. <6> Reload `.bashrc` to have `direnv` and `reflex` working in your current shell. diff --git a/docs/index.html b/docs/index.html index 8ae42ea..d1bcdf0 100644 --- a/docs/index.html +++ b/docs/index.html @@ -7,7 +7,7 @@ - + Your GitHub App to make Buildbot a part of your Pull Request workflow. @@ -89,10 +89,10 @@ ul,ol,dl{line-height:1.6;margin-bottom:1.25em;list-style-position:outside;font-family:inherit} ul,ol{margin-left:1.5em} ul li ul,ul li ol{margin-left:1.25em;margin-bottom:0} -ul.square li ul,ul.circle li ul,ul.disc li ul{list-style:inherit} -ul.square{list-style-type:square} ul.circle{list-style-type:circle} ul.disc{list-style-type:disc} +ul.square{list-style-type:square} +ul.circle ul:not([class]),ul.disc ul:not([class]),ul.square ul:not([class]){list-style:inherit} ol li ul,ol li ol{margin-left:1.25em;margin-bottom:0} dl dt{margin-bottom:.3125em;font-weight:bold} dl dd{margin-bottom:1.25em} @@ -213,13 +213,10 @@ .admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #dddddf;color:rgba(0,0,0,.6);word-wrap:anywhere} .admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0} .exampleblock>.content{border:1px solid #e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;border-radius:4px} -.exampleblock>.content>:first-child{margin-top:0} -.exampleblock>.content>:last-child{margin-bottom:0} .sidebarblock{border:1px solid #dbdbd6;margin-bottom:1.25em;padding:1.25em;background:#f3f3f2;border-radius:4px} -.sidebarblock>:first-child{margin-top:0} -.sidebarblock>:last-child{margin-bottom:0} .sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center} -.exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0} +.exampleblock>.content>:first-child,.sidebarblock>.content>:first-child{margin-top:0} +.exampleblock>.content>:last-child,.exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0} .literalblock pre,.listingblock>.content>pre{border-radius:4px;overflow-x:auto;padding:1em;font-size:.8125em} @media screen and (min-width:768px){.literalblock pre,.listingblock>.content>pre{font-size:.90625em}} @media screen and (min-width:1280px){.literalblock pre,.listingblock>.content>pre{font-size:1em}} @@ -398,7 +395,7 @@ dt,th.tableblock,td.content,div.footnote{text-rendering:optimizeLegibility} h1,h2,p,td.content,span.alt,summary{letter-spacing:-.01em} p strong,td.content strong,div.footnote strong{letter-spacing:-.005em} -p,blockquote,dt,td.content,span.alt,summary{font-size:1.0625rem} +p,blockquote,dt,td.content,td.hdlist1,span.alt,summary{font-size:1.0625rem} p{margin-bottom:1.25rem} .sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em} .exampleblock>.content{background:#fffef7;border-color:#e0e0dc;box-shadow:0 1px 4px #e0e0dc} @@ -443,22 +440,22 @@