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

Drafts with No Changes #871

Open
krispharper opened this issue May 21, 2021 · 11 comments
Open

Drafts with No Changes #871

krispharper opened this issue May 21, 2021 · 11 comments

Comments

@krispharper
Copy link

We just installed this and it's working great on some of our repos, but on others, after merging a PR, we get a draft release that just says, "No Changes."

image

Our config in .github looks like this

change-template: '* $TITLE (#$NUMBER)'
template: |
  $CHANGES

Do we have something misconfigured?

@krispharper
Copy link
Author

Actually just noticed that it appears it's always missing the latest PR in the changes. I.e., if we merge one PR it says "No changes." If we then merge another PR, it will list the first PR, but not the second, etc.

@ghost
Copy link

ghost commented May 25, 2021

That is the same behaviour I see in my project. The latest PR merge triggers the action to newly draft the release but the PR merged is not considered and misses in the draft. Only the next merge ensures that the PR appears in the release draft but then again, the most recent misses.

I installed the Release Drafter Github App (Probot), so there is no myrepo/.github/workflows/release-drafter.yml. The template should be "organization-wide" and therefore is placed in the repository .github/.github/release-drafter.yml.

@JimNero009
Copy link

JimNero009 commented Jul 6, 2021

Same for some of our projects -- not all repos, just some of them, have exactly this kind of 'n-1' behaviour.

In our case, we are running this as a dedicated, self-hosted github app, and not through actions.

@krispharper
Copy link
Author

Yes, also noticed that it doesn't affect every repo. I'd say maybe half. But I haven't noticed a pattern as to which ones are affected.

@c-emil
Copy link

c-emil commented May 27, 2022

I noticed the same issue when I pushed a commit straight to the master branch without a PR. It updated the draft release that contained all the PRs that were merged previously with "No Changes" body.

@jetersen
Copy link
Member

@c-emil thats the intended effect. Release drafter is only able to properly categorize pull requests thanks to labels

see #98 #552

@jetersen
Copy link
Member

I have never experienced the n-1 maybe it is because your using the github app?

Have you tried switching to the github action?

@c-emil
Copy link

c-emil commented Jun 16, 2022

@jetersen

thats the intended effect. Release drafter is only able to properly categorize pull requests thanks to labels

I think we misunderstood each other. The problem is that it wipes out the body of the draft release completely and adds "No changes" in the body if I push a commit straight to the master branch. What I'd expect is that either it doesn't change anything in the draft release since it only adds changes from the PR commits, or it adds those commits in the "Other changes" (a preferable solution which was also suggested in the issues you referenced). None of this happens.

@estahn
Copy link

estahn commented Feb 1, 2023

I'm facing a similar issue. Would be great if there is no draft created if there are no changes. I'm using publish: true and it started to create empty releases.

As for @c-emil issue, the content of release-drafter could be placed in tags similar to <!-- release-drafter:being !--> ... <!-- release-drafter:end !-->, which would aid in replacing content partially.

@ksolie
Copy link

ksolie commented Apr 18, 2023

@estahn Did you ever figure out a way to not create a draft if there are no changes?

@rajeshreeputra
Copy link

please find the repo, release drafter creating empty releases. Here releases are published from 2 branches master(2.x releases) and 1.x(1.x releases) form same repo.

https://github.com/acquia/drupal-recommended-project/releases

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

No branches or pull requests

7 participants