mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-11-26 00:22:10 +03:00
Fix typos
This commit is contained in:
parent
23ef18ceaa
commit
67e5f22a7d
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
2
.github/workflows/bin/shared.functions.sh
vendored
2
.github/workflows/bin/shared.functions.sh
vendored
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
22
.github/workflows/update-actions.yml
vendored
22
.github/workflows/update-actions.yml
vendored
@ -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."
|
||||
|
14
.github/workflows/update-branch-version.yml
vendored
14
.github/workflows/update-branch-version.yml
vendored
@ -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
|
||||
|
22
.github/workflows/update-crates.yml
vendored
22
.github/workflows/update-crates.yml
vendored
@ -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."
|
||||
|
@ -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
|
||||
|
@ -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()
|
||||
|
@ -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.
|
||||
|
@ -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]
|
||||
|
@ -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>
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user