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

Ignore Github draft PRs #977

Merged
merged 3 commits into from
Apr 21, 2020
Merged

Ignore Github draft PRs #977

merged 3 commits into from
Apr 21, 2020

Conversation

cket
Copy link
Contributor

@cket cket commented Apr 4, 2020

Related to #491. This change would classify any pull request event coming from draft PRs as an 'OtherPullEvent'. As a result Atlantis will ignore the PR until it is ready for review, at which point new events would be classified as before.

@codecov
Copy link

codecov bot commented Apr 4, 2020

Codecov Report

Merging #977 into master will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #977      +/-   ##
==========================================
+ Coverage   71.95%   71.98%   +0.02%     
==========================================
  Files          65       65              
  Lines        5406     5411       +5     
==========================================
+ Hits         3890     3895       +5     
  Misses       1210     1210              
  Partials      306      306              
Impacted Files Coverage Δ
server/events/event_parser.go 86.09% <100.00%> (+0.16%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8c68621...be1f9bb. Read the comment docs.

@lkysow lkysow added the feature New functionality/enhancement label Apr 6, 2020
Copy link
Member

@lkysow lkysow left a comment

Choose a reason for hiding this comment

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

Question: what happens when the pull request is changed to non-draft? Does an update PR request come through?

@@ -131,6 +131,14 @@ func TestParseGithubPullEvent(t *testing.T) {
_, _, _, _, _, err = parser.ParseGithubPullEvent(&testEvent)
ErrEquals(t, "sender.login is null", err)

// verify that draft PRs are treated as 'other' events
Copy link
Member

Choose a reason for hiding this comment

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

Can you write a separate test please.

@cket
Copy link
Contributor Author

cket commented Apr 10, 2020

When the PR is changed to non-draft it looks like a ready_for_review event comes through, maybe we could treat that the same as an 'open' event so users don't have to manually trigger atlantis

@lkysow
Copy link
Member

lkysow commented Apr 16, 2020

When the PR is changed to non-draft it looks like a ready_for_review event comes through, maybe we could treat that the same as an 'open' event so users don't have to manually trigger atlantis

Yeah I think that would be good.

@lkysow lkysow added the waiting-on-response Waiting for a response from the user label Apr 16, 2020
@cket
Copy link
Contributor Author

cket commented Apr 21, 2020

Thanks for the review! The most recent commit should handle that event

@lkysow lkysow merged commit 9ce981f into runatlantis:master Apr 21, 2020
@lkysow
Copy link
Member

lkysow commented Apr 21, 2020

Awesome work! 🎉

@lkysow lkysow mentioned this pull request Apr 21, 2020
@grimm26
Copy link
Contributor

grimm26 commented Apr 25, 2020

so commits while a PR is a draft are ignored?

@lkysow
Copy link
Member

lkysow commented Apr 25, 2020

so commits while a PR is a draft are ignored?

Yes

@becjon becjon mentioned this pull request Aug 24, 2022
1 task
@Almenon
Copy link
Contributor

Almenon commented Jan 8, 2024

Is there any way one see a plan for their code without making a ready-for-review PR? You could run terraform locally, of course, but there are less technical people who might not have terraform setup locally, or they might not have the right permissions.

@grimm26
Copy link
Contributor

grimm26 commented Jan 8, 2024

Is there any way one see a plan for their code without making a ready-for-review PR? You could run terraform locally, of course, but there are less technical people who might not have terraform setup locally, or they might not have the right permissions.

Yeah, don't ignore draft PRs. That's what I do.
https://www.runatlantis.io/docs/server-configuration.html#allow-draft-prs

@Almenon
Copy link
Contributor

Almenon commented Jan 8, 2024

Oh, cool. Glad it's configurable. Is there a way without making any PR at all?

@grimm26
Copy link
Contributor

grimm26 commented Jan 8, 2024

Atlantis only knows about PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality/enhancement waiting-on-response Waiting for a response from the user
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants