Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ansible repo - Allow actions to create PRs #13

Merged
merged 1 commit into from
Jan 29, 2024

Conversation

ygalblum
Copy link
Contributor

The release action creates a PR updating the changelog

@ygalblum ygalblum requested review from a team as code owners January 29, 2024 15:54

This comment has been minimized.

Copy link
Member

@mwperina mwperina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@netomi
Copy link
Contributor

netomi commented Jan 29, 2024

The reason no change is displayed in the diff view is because you try to set a setting on a repo level, that is not permitted on org level:

image

So when trying to set this property on the web ui it is also grayed out:

image

We chose not to display info validation messages, but in this case it probably should be a warning that is always displayed. If you want to enable that setting in any way, you also have to enable it on org level.

@ygalblum
Copy link
Contributor Author

@netomi Does this mean that I have to also enable it at the organization level? Is that OK?
BTW where is the picture you've attached from?

@netomi
Copy link
Contributor

netomi commented Jan 29, 2024

Its ok to enable it on org level, otherwise it can not be set on repo level. In our defaults we have it set to true anyways as in general it should be fine to use that feature.

The screenshot comes from running the otterdog cli tool. the same functionality will be available soon in your PRs, where you can then use a comment like /validate info to see all validation info messages.

The release action creates a PR updating the changelog

Signed-off-by: Ygal Blum <[email protected]>
Copy link

Diff for 4ab29db:
Printing local diff:

Actions are indicated with the following symbols:
+   create
!   modify
!   forced update
-   delete

Organization automotive.bluechi[id=eclipse-bluechi]
  there have been 4 validation infos, enable verbose output with '-v' to to display them.

  
!   org_workflow_settings {
!     actions_can_approve_pull_request_reviews = false -> true
!   }

  
!   repo_workflow_settings[repository="bluechi-ansible-collection"] {
!     actions_can_approve_pull_request_reviews = false -> true
!   }
  
  Plan: 0 to add, 2 to change, 0 to delete.
Canonical Diff for 4ab29db:
Showing canonical diff:

Organization automotive.bluechi[id=eclipse-bluechi]

--- canonical
+++ original
@@ -93,7 +93,6 @@
       branch_protection_rules: [
         orgs.newBranchProtectionRule('main') {
           required_approving_review_count: 1
-          required_status_checks+: []
           requires_conversation_resolution: true
           requires_linear_history: true
           requires_strict_status_checks: true
@@ -109,16 +108,12 @@
         "ansible"
         "bluechi"
       ]
-      workflows+: {
-        actions_can_approve_pull_request_reviews: true
-      }
     }
     orgs.newRepo('bluechi-on-yocto') {
       allow_update_branch: false
       branch_protection_rules: [
         orgs.newBranchProtectionRule('main') {
           required_approving_review_count: 1
-          required_status_checks+: []
           requires_conversation_resolution: true
           requires_linear_history: true
           requires_strict_status_checks: true
@@ -156,7 +151,6 @@
       branch_protection_rules: [
         orgs.newBranchProtectionRule('main') {
           required_approving_review_count: 1
-          required_status_checks+: []
           requires_conversation_resolution: true
           requires_linear_history: true
           requires_strict_status_checks: true
@@ -191,8 +185,5 @@
     packages_containers_public: false
     readers_can_create_discussions: true
     web_commit_signoff_required: false
-    workflows+: {
-      actions_can_approve_pull_request_reviews: true
-    }
   }
 }

@ygalblum
Copy link
Contributor Author

@netomi I've updated my change to enable it also at the org level

@netomi netomi merged commit 7b37563 into eclipse-bluechi:main Jan 29, 2024
2 checks passed
@netomi
Copy link
Contributor

netomi commented Jan 29, 2024

changes are live.

@ygalblum
Copy link
Contributor Author

changes are live.

Thanks

@ygalblum ygalblum deleted the ansible-allow-action-pr branch January 29, 2024 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants