Commit 16c1e02
[MAINT][FEAT] Fix Org Ruleset tests && enable
* Switch from `NewSubsystemLoggingHTTPTransport` to `NewLoggingHTTPTransport`
Updated the logging transport in the RateLimitedHTTPClient function to use NewLoggingHTTPTransport. As the subsystem would need to be explicitly inititated in each resource
Signed-off-by: Timo Sand <[email protected]>
* Ensure `update_allows_fetch_and_merge` isn't added for Org Ruleset
Signed-off-by: Timo Sand <[email protected]>
* Need to have one of `repository_name` or `repository_id` defined
Signed-off-by: Timo Sand <[email protected]>
* Update indentation
Signed-off-by: Timo Sand <[email protected]>
* Add handling of `AllowedMergeMethods`
It's a required field in the API and go-github doesn't use `omitempty`, so it submits `nil` if it isn't sent explicitly.
This change tries to keep it in the state, without having a configuration option for it (poor choice?)
And it defaults to all 3 available merge methods if it can't set something from the state.
Signed-off-by: Timo Sand <[email protected]>
* Add `allowed_merge_methods` to `rules` for Org & Repo rulesets
This is a required field and the SDK doesn't omit if it's empty
Signed-off-by: Timo Sand <[email protected]>
* Fixed type conversion for `allowed_merge_methods`
Signed-off-by: Timo Sand <[email protected]>
* Update test content to actually pass the GH API
Signed-off-by: Timo Sand <[email protected]>
* Enable `TestGithubOrganizationRulesets/Creates_and_updates_organization_rulesets_without_errors` to pass
Signed-off-by: Timo Sand <[email protected]>
* Add workaround for GH API bug that OrgAdmin actor_id is returned as `null`
Signed-off-by: Timo Sand <[email protected]>
* `make fmt`
Signed-off-by: Timo Sand <[email protected]>
* Fix `TestGithubOrganizationRulesets/Creates_organization_ruleset_with_all_bypass_modes`
Main fix: `bypass_actors` is returned as sorted from GH API so tests need re-indexing
Signed-off-by: Timo Sand <[email protected]>
* Update github/resource_github_organization_ruleset_test.go
Co-authored-by: Steve Hipwell <[email protected]>
* Update github/resource_github_organization_ruleset_test.go
Co-authored-by: Steve Hipwell <[email protected]>
* Update github/resource_github_organization_ruleset_test.go
Co-authored-by: Steve Hipwell <[email protected]>
* Fix casing of constant
Signed-off-by: Timo Sand <[email protected]>
* Fix attribute reference
Signed-off-by: Timo Sand <[email protected]>
* Refactor `Providers` => `ProviderFactories` in org ruleset tests
Signed-off-by: Timo Sand <[email protected]>
* Remove "normalizing" `actor_id``
With the recent changes to the SDK and the Create method we less often purely refresh state if it hasn't changed upstream, leading to us ignoring the return value of `actor_id` often
Signed-off-by: Timo Sand <[email protected]>
* Refactor to use `tflog` in `resource_github_organization_ruleset.go`
Signed-off-by: Timo Sand <[email protected]>
---------
Signed-off-by: Timo Sand <[email protected]>
Co-authored-by: Steve Hipwell <[email protected]>allowed_merge_methods (#2976)1 parent 569610a commit 16c1e02
5 files changed
Lines changed: 247 additions & 41 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
201 | 211 | | |
202 | 212 | | |
203 | 213 | | |
| |||
588 | 598 | | |
589 | 599 | | |
590 | 600 | | |
591 | | - | |
592 | 601 | | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
593 | 608 | | |
594 | 609 | | |
595 | 610 | | |
596 | 611 | | |
597 | 612 | | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
598 | 618 | | |
599 | 619 | | |
600 | 620 | | |
| |||
603 | 623 | | |
604 | 624 | | |
605 | 625 | | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
606 | 632 | | |
607 | 633 | | |
608 | 634 | | |
609 | 635 | | |
610 | 636 | | |
611 | | - | |
612 | 637 | | |
613 | 638 | | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
614 | 644 | | |
615 | 645 | | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
616 | 651 | | |
617 | 652 | | |
618 | 653 | | |
| |||
625 | 660 | | |
626 | 661 | | |
627 | 662 | | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
628 | 667 | | |
629 | 668 | | |
630 | 669 | | |
631 | | - | |
632 | | - | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
633 | 674 | | |
634 | 675 | | |
635 | 676 | | |
636 | 677 | | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
637 | 683 | | |
638 | 684 | | |
639 | 685 | | |
| |||
647 | 693 | | |
648 | 694 | | |
649 | 695 | | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
650 | 702 | | |
651 | 703 | | |
652 | 704 | | |
653 | 705 | | |
654 | 706 | | |
655 | | - | |
656 | 707 | | |
657 | | - | |
658 | | - | |
| 708 | + | |
659 | 709 | | |
660 | 710 | | |
661 | 711 | | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
662 | 717 | | |
663 | 718 | | |
664 | 719 | | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
665 | 728 | | |
666 | 729 | | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
667 | 735 | | |
668 | 736 | | |
669 | 737 | | |
| |||
672 | 740 | | |
673 | 741 | | |
674 | 742 | | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
675 | 749 | | |
676 | 750 | | |
677 | 751 | | |
| |||
681 | 755 | | |
682 | 756 | | |
683 | 757 | | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
684 | 763 | | |
685 | 764 | | |
686 | 765 | | |
687 | | - | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
688 | 771 | | |
689 | 772 | | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
690 | 778 | | |
691 | 779 | | |
692 | 780 | | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
693 | 786 | | |
694 | 787 | | |
695 | 788 | | |
696 | 789 | | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
697 | 793 | | |
698 | 794 | | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
699 | 800 | | |
700 | 801 | | |
701 | 802 | | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
702 | 807 | | |
703 | 808 | | |
704 | | - | |
705 | 809 | | |
706 | | - | |
707 | | - | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
708 | 814 | | |
709 | 815 | | |
710 | 816 | | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
711 | 822 | | |
712 | 823 | | |
713 | 824 | | |
714 | 825 | | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
715 | 832 | | |
716 | 833 | | |
0 commit comments