This is an automated email from the ASF dual-hosted git repository.
aw pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/yetus.git
The following commit(s) were added to refs/heads/main by this push:
new 517c3ba YETUS-1061. remove github user and password support (#183)
517c3ba is described below
commit 517c3ba0bdb69f1ae495646027e82cfa468e585c
Author: Allen Wittenauer <[email protected]>
AuthorDate: Fri Oct 30 07:09:30 2020 -0700
YETUS-1061. remove github user and password support (#183)
---
.../in-progress/precommit/bugsystems.html.md | 14 +-----------
.../in-progress/precommit/plugins/github.html.md | 2 --
precommit/src/main/shell/test-patch.d/github.sh | 26 ----------------------
3 files changed, 1 insertion(+), 41 deletions(-)
diff --git
a/asf-site-src/source/documentation/in-progress/precommit/bugsystems.html.md
b/asf-site-src/source/documentation/in-progress/precommit/bugsystems.html.md
index b19c152..d6c70e4 100644
--- a/asf-site-src/source/documentation/in-progress/precommit/bugsystems.html.md
+++ b/asf-site-src/source/documentation/in-progress/precommit/bugsystems.html.md
@@ -98,7 +98,7 @@ Pull requests that are made off of a specific branch will
switch the test repo t
## GitHub Authentication
Some operations depend upon authentication credentials. The GitHub plug-in
-supports authentication via token or user name/passphrase. Authentication is
+supports authentication via token. Authentication is
required for controlling the API query rate, accessing private repositories,
reading private pull requests, updating GitHub Statuses (requires
`repo:status` permissions), writing comments to PRs, and other functionality.
@@ -110,18 +110,6 @@ the appropriate documentation for your particular setup.
The token is provided via the `--github-token` option.
-### GitHub Username/password
-
- NOTE: GitHub is deprecating this format. It is kept here for backward
compatibility
- until such a time the format is completely removed from modern
implementations.
-
-The user name is provided via the `--github-user` option or the GITHUB\_USER
environment variable. The default value for GITHUB\_USER is the value of
`--project` suffixed with QA. For example,
-`--project=yetus` will set `GITHUB_USER=yetusqa`.
-
-The password is provided via the `--github-password` or GITHUB\_PASSWD
environment variable.
-
-Both username and password options must be provided.
-
# GitLab Specific
GitLab supports the full range of functionality, including putting comments on
individual lines. Be aware, however, that `test-patch` will (generally)
require that GitLab MRs be fully squashed and rebased (i.e., a single commit)
in many circumstances.
diff --git
a/asf-site-src/source/documentation/in-progress/precommit/plugins/github.html.md
b/asf-site-src/source/documentation/in-progress/precommit/plugins/github.html.md
index f22ab96..9da3ce2 100644
---
a/asf-site-src/source/documentation/in-progress/precommit/plugins/github.html.md
+++
b/asf-site-src/source/documentation/in-progress/precommit/plugins/github.html.md
@@ -39,9 +39,7 @@ None
|:---------|:------|
| `--github-api-url=<url>` | REST API URL (for GitHub Enterprise) |
| `--github-base-url=<url>` | Non-REST API URL (for GitHub Enterprise) |
-| `--github-password=<pw>` | Password or OAuth 2.0 token to use for
authentication |
| `--github-repo=<repo>` | `username/repository` identifier |
-| `--github-user=<user>` | Username to use for authentication |
| `--github-token=<token>` | Token used to perform read and write operations |
# Docker Notes
diff --git a/precommit/src/main/shell/test-patch.d/github.sh
b/precommit/src/main/shell/test-patch.d/github.sh
index 4e01a5d..9e8419d 100755
--- a/precommit/src/main/shell/test-patch.d/github.sh
+++ b/precommit/src/main/shell/test-patch.d/github.sh
@@ -33,8 +33,6 @@ GITHUB_API_URL="https://api.github.com"
GITHUB_REPO=""
# user settings
-GITHUB_PASSWD="${GITHUB_PASSWD-}"
-GITHUB_USER="${GITHUB_USER-}"
GITHUB_TOKEN="${GITHUB_TOKEN-}"
GITHUB_ISSUE=""
GITHUB_USE_EMOJI_VOTE=false
@@ -43,25 +41,12 @@ declare -a GITHUB_AUTH
# private globals...
GITHUB_BRIDGED=false
-# Simple function to set a default GitHub user after PROJECT_NAME has been set
-function github_set_github_user
-{
- if [[ -n "${PROJECT_NAME}" && ! "${PROJECT_NAME}" = unknown ]]; then
- GITHUB_USER=${GITHUB_USER:-"${PROJECT_NAME}qa"}
- fi
-}
-
function github_usage
{
- github_set_github_user
-
yetus_add_option "--github-api-url=<url>" "The URL of the API for github
(default: '${GITHUB_API_URL}')"
yetus_add_option "--github-base-url=<url>" "The URL of the github server
(default:'${GITHUB_BASE_URL}')"
-# Do not extract GITHUB_PASSWD environment variable
- yetus_add_option "--github-password=<pw>" "Github password (or OAuth token)
(default: 'GITHUB_PASSWD' environment variable)"
yetus_add_option "--github-repo=<repo>" "github repo to use
(default:'${GITHUB_REPO}')"
yetus_add_option "--github-token=<token>" "The token to use to read/write to
github"
- yetus_add_option "--github-user=<user>" "Github user [default:
${GITHUB_USER}]"
yetus_add_option "--github-use-emoji-vote" "Whether to use emoji to
represent the vote result on github [default: ${GITHUB_USE_EMOJI_VOTE}]"
}
@@ -85,18 +70,10 @@ function github_parse_args
delete_parameter "${i}"
GITHUB_REPO=${i#*=}
;;
- --github-password=*)
- delete_parameter "${i}"
- GITHUB_PASSWD=${i#*=}
- ;;
--github-token=*)
delete_parameter "${i}"
GITHUB_TOKEN=${i#*=}
;;
- --github-user=*)
- delete_parameter "${i}"
- GITHUB_USER=${i#*=}
- ;;
--github-use-emoji-vote)
delete_parameter "${i}"
GITHUB_USE_EMOJI_VOTE=true
@@ -181,9 +158,6 @@ function github_initialize
if [[ -n "${GITHUB_TOKEN}" ]]; then
GITHUB_AUTH=(-H "Authorization: token ${GITHUB_TOKEN}")
- elif [[ -n "${GITHUB_USER}"
- && -n "${GITHUB_PASSWD}" ]]; then
- GITHUB_AUTH=(-u "${GITHUB_USER}:${GITHUB_PASSWD}")
fi
# if the default branch hasn't been set yet, ask GitHub