ocket8888 commented on a change in pull request #5506:
URL: https://github.com/apache/trafficcontrol/pull/5506#discussion_r573942106



##########
File path: .github/actions/pr-to-update-go/README.rst
##########
@@ -0,0 +1,73 @@
+..
+..
+.. Licensed under the Apache License, Version 2.0 (the "License");
+.. you may not use this file except in compliance with the License.
+.. You may obtain a copy of the License at
+..
+..     http://www.apache.org/licenses/LICENSE-2.0
+..
+.. Unless required by applicable law or agreed to in writing, software
+.. distributed under the License is distributed on an "AS IS" BASIS,
+.. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+.. See the License for the specific language governing permissions and
+.. limitations under the License.
+..
+
+***************
+pr-to-update-go
+***************
+
+Opens a PR if a new minor Go revision is available.
+
+For example, it will open a PR if the ``GO_VERSION`` contains ``1.14.7`` but 
Go versions 1.15.1 and 1.14.8 are available, it will
+
+1. Create a branch named ``go-1.14.8`` to update the repo's Go version to 
1.14.8
+2. Open a PR targeting the ``master`` branch from branch ``go-1.14.8``
+
+Other behavior in this scenario:
+
+- If a branch named ``go-1.14.8`` already exists, no additional branch is 
created.
+- If a PR titled *Update Go version to 1.14.8* already exists, no additional 
PR is opened.
+
+Environment Variables
+=====================
+
++----------------------------+----------------------------------------------------------------------------------+
+| Environment Variable Name  | Value                                           
                                 |
++============================+==================================================================================+
+| ``GIT_AUTHOR_NAME``        | Optional. The username to associate with the 
commit that updates the Go version. |
++----------------------------+----------------------------------------------------------------------------------+
+| ``GITHUB_TOKEN``           | Required. ``${{ github.token }}`` or ``${{ 
secrets.GITHUB_TOKEN }}``             |
++----------------------------+----------------------------------------------------------------------------------+
+| ``GO_VERSION_FILE``        | Required. The file in the repo containing the 
version of Go used by the repo.    |
++----------------------------+----------------------------------------------------------------------------------+
+
+
+Outputs
+=======
+
+``exit-code``
+-------------
+
+Exit code is 0 unless an error was encountered.
+
+Example usage
+=============
+
+.. code-block:: yaml
+
+       - name: PR to Update Go
+         run: python3 -m pr_to_update_go
+         env:
+           GIT_AUTHOR_NAME: asfgit
+           GITHUB_TOKEN: ${{ github.token }}
+           GO_VERSION_FILE: GO_VERSION
+
+Tests
+=====
+
+To run the unit tests:
+
+.. code-block:: shell
+
+       python3 -m unittest discover ./tests

Review comment:
       If the intended parser is PyPi it also won't work (I know from my 
experience packaging the TO Python client), but I think that's probably less 
likely.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to