| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -155,21 +155,21 @@ jobs: | |||
| 155 | 155 | result-encoding: string | |
| 156 | 156 | - run: | | |
| 157 | 157 | echo "- Validating user-agent default" | |
| 158 | - expected="actions/github-script octokit-core.js/" | ||
| 159 | - if [[ "${{steps.user-agent-default.outputs.result}}" != "$expected"* ]]; then | ||
| 160 | - echo $'::error::\u274C' "Expected user-agent to start with '$expected', got ${{steps.user-agent-default.outputs.result}}" | ||
| 158 | + ua="${{steps.user-agent-default.outputs.result}}" | ||
| 159 | + if [[ "$ua" != "actions/github-script octokit-core.js/"* ]] && [[ "$ua" != "actions/github-script actions_orchestration_id/"* ]]; then | ||
| 160 | + echo $'::error::\u274C' "Expected user-agent to start with 'actions/github-script', got $ua" | ||
| 161 | 161 | exit 1 | |
| 162 | 162 | fi | |
| 163 | 163 | echo "- Validating user-agent set to a value" | |
| 164 | - expected="foobar octokit-core.js/" | ||
| 165 | - if [[ "${{steps.user-agent-set.outputs.result}}" != "$expected"* ]]; then | ||
| 166 | - echo $'::error::\u274C' "Expected user-agent to start with '$expected', got ${{steps.user-agent-set.outputs.result}}" | ||
| 164 | + ua="${{steps.user-agent-set.outputs.result}}" | ||
| 165 | + if [[ "$ua" != "foobar octokit-core.js/"* ]] && [[ "$ua" != "foobar actions_orchestration_id/"* ]]; then | ||
| 166 | + echo $'::error::\u274C' "Expected user-agent to start with 'foobar', got $ua" | ||
| 167 | 167 | exit 1 | |
| 168 | 168 | fi | |
| 169 | 169 | echo "- Validating user-agent set to an empty string" | |
| 170 | - expected="actions/github-script octokit-core.js/" | ||
| 171 | - if [[ "${{steps.user-agent-empty.outputs.result}}" != "$expected"* ]]; then | ||
| 172 | - echo $'::error::\u274C' "Expected user-agent to start with '$expected', got ${{steps.user-agent-empty.outputs.result}}" | ||
| 170 | + ua="${{steps.user-agent-empty.outputs.result}}" | ||
| 171 | + if [[ "$ua" != "actions/github-script octokit-core.js/"* ]] && [[ "$ua" != "actions/github-script actions_orchestration_id/"* ]]; then | ||
| 172 | + echo $'::error::\u274C' "Expected user-agent to start with 'actions/github-script', got $ua" | ||
| 173 | 173 | exit 1 | |
| 174 | 174 | fi | |
| 175 | 175 | echo $'\u2705 Test passed' | tee -a $GITHUB_STEP_SUMMARY | |
| Back | FazBrowse Home | New Git URL |
0 commit comments