Fix typos

This commit is contained in:
Viktor Szépe 2024-07-18 13:33:18 +00:00 committed by hurl-bot
parent 23ef18ceaa
commit 67e5f22a7d
No known key found for this signature in database
GPG Key ID: 1283A2B4A0DCAF8D
13 changed files with 47 additions and 47 deletions

View File

@ -23,11 +23,11 @@ function usage(){
echo " : example: --github-project-path Orange-OpenSource/hurl"
echo
echo " --github-token <github token access> #mandatory"
echo " specify github user token with acces to PR api"
echo " specify github user token with access to PR api"
echo " : example: --github-token ghp_kJvDuaalZidk3nB1uYtgsqMrkQ5Hkh76jh2o"
echo
echo " --max-days-of-inactivity <days> #optional"
echo " maximium days of inactivity before closing a PR"
echo " maximum days of inactivity before closing a PR"
echo " : default value: 30"
echo " : example for a month: 7"
echo

View File

@ -22,7 +22,7 @@ function usage(){
echo " : example: orange-opensource/hurl"
echo
echo " --github-token <github token access> #mandatory"
echo " specify github user token with acces to PR api"
echo " specify github user token with access to PR api"
echo " : example: --github-token ghp_kJvDuaalZtyhinB1uYtgsqMrkQ5Hkh76jh2o"
echo
}
@ -123,7 +123,7 @@ function is_release(){
if [[ $gh_exit_code -eq 0 ]] ; then
echo "${release} is a release in ${github_repo}"
else
log_error "release informations" "${release} release does not exist in ${github_repo}"
log_error "release information" "${release} release does not exist in ${github_repo}"
return 1
fi
}

View File

@ -101,7 +101,7 @@ function github_get_latest_release(){
log_error "${FUNCNAME[0]}" "$(head -1 <<< "${result}")"
return 1
else
latest=$(echo "$result" | grep Lates | cut --field 3)
latest=$(echo "$result" | grep Latest | cut --field 3)
if [[ -z $latest ]] ; then
log_error "Latest version" "Action $project_path does not have any release tagged as latest, please check this repo"
exit 1

View File

@ -19,7 +19,7 @@ function usage(){
echo " : example: --dry"
echo
echo " --github-token <github token access> #mandatory"
echo " specify github user token with acces to PR api"
echo " specify github user token with access to PR api"
echo " : example: --github-token ghp_kJvDuaalZtyhinB1uYtgsqMrkQ5Hkh76jh2o"
echo
}

View File

@ -13,7 +13,7 @@ jobs:
GITHUB_CONTEXT: ${{ toJson(github) }}
GITHUB_TOKEN: ${{ secrets.HURL_BOT_TOKEN }}
REPO: ${{ github.repository }}
BOT_UPDATE_BRANCHE_NAME: "bot/update-actions"
BOT_UPDATE_BRANCH_NAME: "bot/update-actions"
name: update-actions
runs-on: ubuntu-latest
steps:
@ -40,7 +40,7 @@ jobs:
- name: Get actual pull request id
run: |
ACTUAL_PR_NUMBER=$(gh pr list --repo "${REPO}" --head "${BOT_UPDATE_BRANCHE_NAME}" --state "open" --json number --jq .[].number)
ACTUAL_PR_NUMBER=$(gh pr list --repo "${REPO}" --head "${BOT_UPDATE_BRANCH_NAME}" --state "open" --json number --jq .[].number)
ACTUAL_PR_NUMBER=${ACTUAL_PR_NUMBER:-0}
echo "ACTUAL_PR_NUMBER=${ACTUAL_PR_NUMBER}" | tee -a "${GITHUB_ENV}"
if [ ${ACTUAL_PR_NUMBER} -eq 0 ] ; then
@ -80,20 +80,20 @@ jobs:
- name: Push updates to branch
if: env.UPDATED_ACTIONS_COUNT != 0
run: |
git checkout -b "${BOT_UPDATE_BRANCHE_NAME}"
git checkout -b "${BOT_UPDATE_BRANCH_NAME}"
git commit -am "Update actions"
git push --set-upstream origin "${BOT_UPDATE_BRANCHE_NAME}" && git_exit_code=0 || git_exit_code=$?
git push --set-upstream origin "${BOT_UPDATE_BRANCH_NAME}" && git_exit_code=0 || git_exit_code=$?
if [ ${git_exit_code} -eq 0 ] ; then
echo " - ✅ push actions update to ${BOT_UPDATE_BRANCHE_NAME} succeeds."
echo " - ✅ push actions update to ${BOT_UPDATE_BRANCH_NAME} succeeds."
else
echo " - ❌ A problem occurs when attempting to push actions update to origin/${BOT_UPDATE_BRANCHE_NAME}."
echo " - ❌ A problem occurs when attempting to push actions update to origin/${BOT_UPDATE_BRANCH_NAME}."
exit 1
fi
branch_exists=$(git ls-remote | (grep -c "${BOT_UPDATE_BRANCHE_NAME}" || true))
branch_exists=$(git ls-remote | (grep -c "${BOT_UPDATE_BRANCH_NAME}" || true))
if [ ${branch_exists} -eq 1 ] ; then
echo " - ✅ The origin/${BOT_UPDATE_BRANCHE_NAME} now branch exists on remote."
echo " - ✅ The origin/${BOT_UPDATE_BRANCH_NAME} now branch exists on remote."
else
echo " - ❌ Git push command succeeds but origin/${BOT_UPDATE_BRANCHE_NAME} still does not exist on remote."
echo " - ❌ Git push command succeeds but origin/${BOT_UPDATE_BRANCH_NAME} still does not exist on remote."
exit 1
fi
@ -101,9 +101,9 @@ jobs:
if: env.UPDATED_ACTIONS_COUNT != 0
run: |
GITHUB_TOKEN=${{ secrets.HURL_BOT_TOKEN }}
gh pr create --fill --base master --head "${BOT_UPDATE_BRANCHE_NAME}" && gh_exit_code=0 || gh_exit_code=$?
gh pr create --fill --base master --head "${BOT_UPDATE_BRANCH_NAME}" && gh_exit_code=0 || gh_exit_code=$?
if [ ${gh_exit_code} -eq 0 ] ; then
NEW_PR_NUMBER=$(gh pr list --repo "${REPO}" --head "${BOT_UPDATE_BRANCHE_NAME}" --state "open" --json number --jq .[].number)
NEW_PR_NUMBER=$(gh pr list --repo "${REPO}" --head "${BOT_UPDATE_BRANCH_NAME}" --state "open" --json number --jq .[].number)
echo " - ✅ Creation of pull request n°${NEW_PR_NUMBER} succeeds."
else
echo " - ❌ A problem occurs when attempting to create new pull request."

View File

@ -54,7 +54,7 @@ jobs:
- name: Init bot branch name
run: |
base=$(echo "${{ github.ref }}" | sed "s#refs/heads/##g" | tr '/' '-')
echo "BOT_UPDATE_VERSION_BRANCHE_NAME=bot/update-branch-version-${base}" | tee -a $GITHUB_ENV
echo "BOT_UPDATE_VERSION_BRANCH_NAME=bot/update-branch-version-${base}" | tee -a $GITHUB_ENV
- name: Update version
run: |
@ -102,13 +102,13 @@ jobs:
- name: Push commits
run: |
git checkout -b "${BOT_UPDATE_VERSION_BRANCHE_NAME}"
git checkout -b "${BOT_UPDATE_VERSION_BRANCH_NAME}"
git commit -am "Update hurl version to ${{ inputs.new_version }}"
git push --set-upstream origin "${BOT_UPDATE_VERSION_BRANCHE_NAME}" && git_exit_code=0 || git_exit_code=$?
git push --set-upstream origin "${BOT_UPDATE_VERSION_BRANCH_NAME}" && git_exit_code=0 || git_exit_code=$?
if [ ${git_exit_code} -eq 0 ] ; then
echo " - ✅ commits pushed to ${BOT_UPDATE_VERSION_BRANCHE_NAME} branch."
echo " - ✅ commits pushed to ${BOT_UPDATE_VERSION_BRANCH_NAME} branch."
else
echo " - ❌ A problem occurs when attempting to push create release commits to ${BOT_UPDATE_VERSION_BRANCHE_NAME} branch."
echo " - ❌ A problem occurs when attempting to push create release commits to ${BOT_UPDATE_VERSION_BRANCH_NAME} branch."
exit 1
fi
@ -118,9 +118,9 @@ jobs:
GITHUB_TOKEN=${{ secrets.HURL_BOT_TOKEN }}
git fetch
base=$(echo "${{ github.ref }}" | sed "s#refs/heads/##g")
gh pr create --fill --label bot --base "${base}" --head "${BOT_UPDATE_VERSION_BRANCHE_NAME}" && gh_exit_code=0 || gh_exit_code=$?
gh pr create --fill --label bot --base "${base}" --head "${BOT_UPDATE_VERSION_BRANCH_NAME}" && gh_exit_code=0 || gh_exit_code=$?
if [ ${gh_exit_code} -eq 0 ] ; then
NEW_PR_NUMBER=$(gh pr list --repo "${REPO}" --head "${BOT_UPDATE_VERSION_BRANCHE_NAME}" --state "open" --json number --jq .[].number)
NEW_PR_NUMBER=$(gh pr list --repo "${REPO}" --head "${BOT_UPDATE_VERSION_BRANCH_NAME}" --state "open" --json number --jq .[].number)
echo " - ✅ Creation of pull request n°${NEW_PR_NUMBER} succeeds."
echo "pr_number=${NEW_PR_NUMBER}" | tee -a $GITHUB_OUTPUT
else

View File

@ -13,7 +13,7 @@ jobs:
GITHUB_CONTEXT: ${{ toJson(github) }}
GITHUB_TOKEN: ${{ secrets.HURL_BOT_TOKEN }}
REPO: ${{ github.repository }}
BOT_UPDATE_BRANCHE_NAME: "bot/update-crates"
BOT_UPDATE_BRANCH_NAME: "bot/update-crates"
name: update-crates
runs-on: ubuntu-latest
steps:
@ -39,7 +39,7 @@ jobs:
- name: Get actual pull request id
run: |
ACTUAL_PR_NUMBER=$(gh pr list --repo "${REPO}" --head "${BOT_UPDATE_BRANCHE_NAME}" --state "open" --json number --jq .[].number)
ACTUAL_PR_NUMBER=$(gh pr list --repo "${REPO}" --head "${BOT_UPDATE_BRANCH_NAME}" --state "open" --json number --jq .[].number)
ACTUAL_PR_NUMBER=${ACTUAL_PR_NUMBER:-0}
echo "ACTUAL_PR_NUMBER=${ACTUAL_PR_NUMBER}" | tee -a "${GITHUB_ENV}"
if [ ${ACTUAL_PR_NUMBER} -eq 0 ] ; then
@ -79,20 +79,20 @@ jobs:
- name: Push updates to branch
if: env.UPDATED_CRATES_COUNT != 0
run: |
git checkout -b "${BOT_UPDATE_BRANCHE_NAME}"
git checkout -b "${BOT_UPDATE_BRANCH_NAME}"
git commit -am "Update crates"
git push --set-upstream origin "${BOT_UPDATE_BRANCHE_NAME}" && git_exit_code=0 || git_exit_code=$?
git push --set-upstream origin "${BOT_UPDATE_BRANCH_NAME}" && git_exit_code=0 || git_exit_code=$?
if [ ${git_exit_code} -eq 0 ] ; then
echo " - ✅ push crates update to ${BOT_UPDATE_BRANCHE_NAME} succeeds."
echo " - ✅ push crates update to ${BOT_UPDATE_BRANCH_NAME} succeeds."
else
echo " - ❌ A problem occurs when attempting to push crates update to origin/${BOT_UPDATE_BRANCHE_NAME}."
echo " - ❌ A problem occurs when attempting to push crates update to origin/${BOT_UPDATE_BRANCH_NAME}."
exit 1
fi
branch_exists=$(git ls-remote | (grep -c "${BOT_UPDATE_BRANCHE_NAME}" || true))
branch_exists=$(git ls-remote | (grep -c "${BOT_UPDATE_BRANCH_NAME}" || true))
if [ ${branch_exists} -eq 1 ] ; then
echo " - ✅ The origin/${BOT_UPDATE_BRANCHE_NAME} now branch exists on remote."
echo " - ✅ The origin/${BOT_UPDATE_BRANCH_NAME} now branch exists on remote."
else
echo " - ❌ Git push command succeeds but origin/${BOT_UPDATE_BRANCHE_NAME} still does not exist on remote."
echo " - ❌ Git push command succeeds but origin/${BOT_UPDATE_BRANCH_NAME} still does not exist on remote."
exit 1
fi
@ -100,9 +100,9 @@ jobs:
if: env.UPDATED_CRATES_COUNT != 0
run: |
GITHUB_TOKEN=${{ secrets.HURL_BOT_TOKEN }}
gh pr create --fill --base master --head "${BOT_UPDATE_BRANCHE_NAME}" && gh_exit_code=0 || gh_exit_code=$?
gh pr create --fill --base master --head "${BOT_UPDATE_BRANCH_NAME}" && gh_exit_code=0 || gh_exit_code=$?
if [ ${gh_exit_code} -eq 0 ] ; then
NEW_PR_NUMBER=$(gh pr list --repo "${REPO}" --head "${BOT_UPDATE_BRANCHE_NAME}" --state "open" --json number --jq .[].number)
NEW_PR_NUMBER=$(gh pr list --repo "${REPO}" --head "${BOT_UPDATE_BRANCH_NAME}" --state "open" --json number --jq .[].number)
echo " - ✅ Creation of pull request n°${NEW_PR_NUMBER} succeeds."
else
echo " - ❌ A problem occurs when attempting to create new pull request."

View File

@ -1,5 +1,5 @@
# With a streaming endpoint,
# Hurl is hanging without outputing anything
# Hurl is hanging without outputting anything
#
# curl outputs when it received data
# $ curl http://localhost:8000/streaming

View File

@ -202,7 +202,7 @@ pub fn include(arg_matches: &ArgMatches) -> bool {
}
/// Returns true if we have at least one input files.
/// The input file can be a file, the standard input, or a glob (evn a glob returns empty results).
/// The input file can be a file, the standard input, or a glob (even a glob returns empty results).
pub fn has_input_files(arg_matches: &ArgMatches) -> bool {
get_strings(arg_matches, "input_files").is_some()
|| get_strings(arg_matches, "glob").is_some()

View File

@ -98,7 +98,7 @@ fn main() {
Err(CliError::Runtime(msg)) => exit_with_error(&msg, EXIT_ERROR_RUNTIME, &base_logger),
};
// Compute duration of the test here to not take reports writings into acccount.
// Compute duration of the test here to not take reports writings into account.
let duration = start.elapsed();
// Write HTML, JUnit, TAP reports on disk.

View File

@ -340,7 +340,7 @@ mod tests {
suggestion(&valid_values, "assert"),
Some("Asserts".to_string())
);
assert_eq!(suggestion(&valid_values, "asser"), None);
assert_eq!(suggestion(&valid_values, "assert"), None);
}
#[test]

View File

@ -414,7 +414,7 @@ mod tests {
<genre>Science Fiction</genre>
<price>6.95</price>
<publish_date>2000-11-02</publish_date>
<description>After an inadvertant trip through a Heisenberg
<description>After an inadvertent trip through a Heisenberg
Uncertainty Device, James Salway discovers the problems
of being quantum.</description>
</book>

View File

@ -122,31 +122,31 @@ impl StyledString {
let mut width = 0;
for token in &self.tokens {
let mut chunck = String::new();
let mut chunk = String::new();
let mut it = token.content.chars().peekable();
// Iterate over each chars of the current token, splitting the current
// token if necessary
while let Some(c) = it.next() {
chunck.push(c);
chunk.push(c);
width += 1;
if width >= max_width {
let token = Token::new(&chunck, token.style);
let token = Token::new(&chunk, token.style);
string.push_token(token);
if it.peek().is_some() {
// New lines are always plain
let nl = Token::new("\n", Style::new());
string.push_token(nl);
}
chunck = String::new();
chunk = String::new();
width = 0;
}
}
// Append the last chunck
if !chunck.is_empty() {
let token = Token::new(&chunck, token.style);
// Append the last chunk
if !chunk.is_empty() {
let token = Token::new(&chunk, token.style);
string.push_token(token);
}
}