You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by "ocket8888 (via GitHub)" <gi...@apache.org> on 2023/02/25 05:32:36 UTC

[GitHub] [trafficcontrol] ocket8888 commented on a diff in pull request #7365: Add GHA to update chromedriver

ocket8888 commented on code in PR #7365:
URL: https://github.com/apache/trafficcontrol/pull/7365#discussion_r1117869126


##########
.github/actions/chromedriver-updater/README.rst:
##########
@@ -0,0 +1,55 @@
+..
+..
+.. 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.
+..
+
+******************
+chromedriver-updater
+******************
+
+Assigns the GitHub Triage role to non-committers who have fixed 2 Issues in the past month.
+
+Environment Variables
+=====================
+
++----------------------------+----------------------------------------------------------------------------------+
+| Environment Variable Name  | Value                                                                            |
++============================+==================================================================================+
+| ``GITHUB_TOKEN``           | Required. ``${{ github.token }}`` or ``${{ secrets.GITHUB_TOKEN }}``             |
++----------------------------+----------------------------------------------------------------------------------+
+| ``PR_GITHUB_TOKEN``        | Required. ``${{ github.token }}`` or another token                               |
++----------------------------+----------------------------------------------------------------------------------+
+| ``GIT_AUTHOR_NAME``        | Optional. The username to associate with the commit that updates the Go version. |
++----------------------------+----------------------------------------------------------------------------------+
+
+Outputs
+=======
+
+``exit-code``
+-------------
+
+Exit code is 0 unless an error was encountered.
+
+Inputs
+=======

Review Comment:
   Underline one character too long



##########
.github/actions/chromedriver-updater/README.rst:
##########
@@ -0,0 +1,55 @@
+..
+..
+.. 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.
+..
+
+******************
+chromedriver-updater
+******************
+
+Assigns the GitHub Triage role to non-committers who have fixed 2 Issues in the past month.
+
+Environment Variables
+=====================
+
++----------------------------+----------------------------------------------------------------------------------+
+| Environment Variable Name  | Value                                                                            |
++============================+==================================================================================+
+| ``GITHUB_TOKEN``           | Required. ``${{ github.token }}`` or ``${{ secrets.GITHUB_TOKEN }}``             |
++----------------------------+----------------------------------------------------------------------------------+
+| ``PR_GITHUB_TOKEN``        | Required. ``${{ github.token }}`` or another token                               |
++----------------------------+----------------------------------------------------------------------------------+
+| ``GIT_AUTHOR_NAME``        | Optional. The username to associate with the commit that updates the Go version. |
++----------------------------+----------------------------------------------------------------------------------+
+
+Outputs
+=======
+
+``exit-code``
+-------------
+
+Exit code is 0 unless an error was encountered.
+
+Inputs
+=======
+Optionally takes a file that contains a line for each project update of the form: `{project path}:{old version},{new version}`
+
+Example usage
+=============
+
+.. code-block:: yaml
+	- name: Update Chromedriver Versions
+	  run: python3 -m chromedriver_updater
+	  env:
+	    GIT_AUTHOR_NAME: asf-ci
+	    GITHUB_TOKEN: ${{ github.token }}

Review Comment:
   this code block doesn't render because you're missing a blank line between the control directives (which just happens to be an empty section since you aren't using any) and the content.



##########
.github/actions/chromedriver-updater/README.rst:
##########
@@ -0,0 +1,55 @@
+..
+..
+.. 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.
+..
+
+******************
+chromedriver-updater
+******************

Review Comment:
   underline and overline on this heading aren't long enough



##########
.github/actions/chromedriver-updater/chromedriver_updater/constants.py:
##########
@@ -0,0 +1,31 @@
+#  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.
+import os
+from typing import Optional
+
+
+def getenv(env_name: str) -> str:
+	"""
+	Gets environment variable :param env_name:
+	"""
+	env_var: Optional[str, None] = os.environ.get(env_name)

Review Comment:
   ```
   TypeError: typing.Optional requires a single type. Got (<class 'str'>, None).
   ```
   Optional only takes a single type index parameter.



##########
.github/actions/chromedriver-updater/chromedriver_updater/templates/pr.md:
##########
@@ -0,0 +1,33 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you 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.
+-->
+
+This PR updates chromedriver in:
+{UPDATES}
+
+## Which Traffic Control components are affected by this PR?
+{PROJECTS}
+
+## What is the best way to verify this PR?
+Verify that the effected e2e tests pass.

Review Comment:
   **a**ffected



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org