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

Allow to deploy 'draft' PRs to some environments #163

Closed
szymonpk opened this issue Jun 22, 2023 · 3 comments · Fixed by #166
Closed

Allow to deploy 'draft' PRs to some environments #163

szymonpk opened this issue Jun 22, 2023 · 3 comments · Fixed by #166
Assignees
Labels
enhancement New feature or request question Further information is requested or the issue is a question

Comments

@szymonpk
Copy link

szymonpk commented Jun 22, 2023

Details

I am wondering. Would it be a good idea to have a list of environments that we can deploy to even if PR is in a draft state?

In "my" organization, people can deploy to some stages before the review. Marking PR as "ready" triggers review requests, and it may be unwanted in most cases.

@szymonpk szymonpk added the question Further information is requested or the issue is a question label Jun 22, 2023
@szymonpk szymonpk changed the title Allow to deploy 'draft' PRs to some branches Allow to deploy 'draft' PRs to some environments Jun 22, 2023
@GrantBirki
Copy link
Member

👋 Great question @szymonpk! I'll weigh in my own thoughts / opinions here.

Professionally and in personal projects, I have never deployed a pull request that was in a draft state. This is because the mentality that I (personally) take with draft PRs is that they are not yet ready to ship. They are a "work in progress" and only become ready to deploy when it is moved out of the draft state.

That being said, there are a lot of ways to embark in the journey on software development and different ways for folks to use GitHub to accomplish what they need to do. One of the core concepts of the branch-deploy Action is indeed flexibility.

I personally would suggest to steer away from making draft PRs deploy-able a habit. However, perhaps there is a really valid reason for your team to do things this way, so we should have the configurations of this Action block you from shipping your code.

I will take a look at the code in this project and see what adjustments, and input options need to be added to enable your team to do this.

Thanks!

@GrantBirki GrantBirki self-assigned this Jun 22, 2023
@szymonpk
Copy link
Author

szymonpk commented Jun 23, 2023

We treat some environments very 'lightly' ;-) In our case, deployment may be the easiest way to present current work (in progress) to a wider audience. Sometimes we work on rather complex data sets.

Also, if this action gets approval in our org, we probably would like to use it for 'dynamic environments' at some point (created per PR). In such case, a draft-blocker would be an issue :(

As for the implementation (I am not proficient in any form of JS), I was thinking it could be done like environment_targets. We could pass a list draft_permitted_targets: "foo,bar" and modify isDraft logic. Check if environment is on the allow list.

@GrantBirki
Copy link
Member

@szymonpk I'll try and accomplish this soon for ya!

@GrantBirki GrantBirki added the enhancement New feature or request label Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested or the issue is a question
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants