Commit 8029980
fix(configure): accept bare org name for --org (#579)
Previously, �do-aw configure --org myorg would build malformed ADO API URLs because the value was used verbatim as the organization URL. When no usable ADO git remote is present (e.g. when the pipeline source lives in GitHub but runs in Azure DevOps), this made --definition-ids unusable without forcing users to pass the full https://dev.azure.com/myorg URL.
Add a
ormalize_org_url helper that:
- prefixes the canonical https://dev.azure.com/ host when a bare org name is passed
- rewrites the legacy {org}.visualstudio.com form to dev.azure.com/{org}`n- trims whitespace and trailing slashes
Apply it in both branches of
esolve_ado_context (override-on-ADO-remote and explicit-no-remote), update the --org CLI help text and docs/cli.md, and add unit tests covering bare names, full URLs, trailing slashes, legacy hosts, and whitespace.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent b841998 commit 8029980
3 files changed
Lines changed: 78 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
652 | 652 | | |
653 | 653 | | |
654 | 654 | | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
655 | 682 | | |
656 | 683 | | |
657 | 684 | | |
| |||
677 | 704 | | |
678 | 705 | | |
679 | 706 | | |
680 | | - | |
| 707 | + | |
681 | 708 | | |
682 | 709 | | |
683 | 710 | | |
| |||
688 | 715 | | |
689 | 716 | | |
690 | 717 | | |
691 | | - | |
| 718 | + | |
692 | 719 | | |
693 | 720 | | |
694 | 721 | | |
| |||
922 | 949 | | |
923 | 950 | | |
924 | 951 | | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
| 997 | + | |
925 | 998 | | |
926 | 999 | | |
927 | 1000 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
| 121 | + | |
| 122 | + | |
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
| |||
0 commit comments