spring-io / github-changelog-generator

Generates release notes that can be published to GitHub
Apache License 2.0
109 stars 34 forks source link

Excluded contributors `*` not working #75

Closed morluna closed 2 years ago

morluna commented 2 years ago

I have a release-notes.yml config file in my project with the following content:

changelog:
  contributors:
    exclude:
      names: ["*"]

I'm expecting for the generated changelog to not include the contributors section. However, I keep getting this:

## :beetle: Bug Fixes
...

## :heart: Contributors

We'd like to thank all the contributors who worked on this release!

- [@iAmericanBoy](https://github.com/iAmericanBoy)
- [@morluna](https://github.com/morluna)

Am I doing something wrong or not understanding what it means to actually exclude contributors?

morluna commented 2 years ago

Actually doing extra digging, it seems that even the title property isn't working:

changelog:
  contributors:
    title: "Awesome Contributors"

Still outputs:

...
## :heart: Contributors
...
philwebb commented 2 years ago

I don't think we search for release-notes.yml files, have you tried using application.yml to configure things?

morluna commented 2 years ago

I'm following the instructions from this Github Action (https://github.com/Decathlon/release-notes-generator-action):

You can manage the sections and how they are used by the release generator, creating the .github/release-notes.yml file in the repository where you activate the action. An example of file content (you can find detailed information directly on the Spring repository)

Under the hood, it looks like the Github action runs:

echo "Checking for custom configuration..."
CONFIG_FILE=".github/release-notes.yml"
if [[ ! -f ${CONFIG_FILE} ]]; then
    echo "No config file specified."
    CONFIG_FILE=""
else
    echo "Configuring the action using $CONFIG_FILE"
fi

if [[ "workflow_dispatch" == "$GITHUB_EVENT_NAME" || "$ACTION" == "$TRIGGER_ACTION" ]]; then
    echo "Creating release notes for Milestone $MILESTONE_ID_TO_USE into the $OUTPUT_FILENAME file"
    java -jar /github-release-notes-generator.jar \
    --changelog.repository=${OWNER_ID}/${REPOSITORY_NAME} \
    --github.username=${GH_USERNAME} \
    --github.password=${GITHUB_TOKEN} \
    --changelog.milestone-reference=id \
    --spring.config.location=${CONFIG_FILE} \
    ${MILESTONE_ID_TO_USE} \
    ${OUTPUT_FOLDER}/${OUTPUT_FILENAME}
    cat ${OUTPUT_FOLDER}/${OUTPUT_FILENAME}

.....
philwebb commented 2 years ago

OK, that's interesting. The --spring.config.location option should allow that to work. You could try running with --debug which should give more log output and show for sure if the file is being loaded. If that doesn't work, can you share a project that we can run and debug.

wilkinsona commented 2 years ago

Closing due to the requested feedback not being provided. If it's provided in the future, we can re-open the issue and take another look.