Skip to content

Config files no longer loaded if they contain a hidden path element #54

@mmornati

Description

@mmornati

What?

With recent updates (maybe related to the spring-boot version?) what we did in the release-notes action seems not working anymore.
After some tests I land to the problem related to the --spring.config.location property which is not taken in count.

java -jar /github-release-notes-generator.jar \
    --changelog.repository=${OWNER_ID}/${REPOSITORY_NAME} \
    --changelog.github.username=${GH_USERNAME} \
    --changelog.github.password=${GITHUB_TOKEN} \
    --changelog.milestone-reference=id \
    --spring.config.location=${CONFIG_FILE} \
    ${MILESTONE_NUMBER} \
    ${OUTPUT_FOLDER}/${OUTPUT_FILENAME}

It always using the default configuration file from the application. So all the custom labels are not taken in count.

How to test?

Create a file with custom labels configuration like the following:

changelog:
  repository: mmornati/test-relese-notes
  sections:
  - title: ":star: Features"
    labels: [ "Feature" ]
  - title: ":chart_with_upwards_trend: Enhancements"
    labels: [ "Enhancement" ]
  - title: ":beetle: Bug Fixes"
    labels: [ "Bug" ]
  - title: ":hammer_and_wrench: Dependency Upgrade"
    labels: [ "Type: Dependency Upgrade" ]
  issues:
    exclude:
      labels: [ "Type: Incorrect Repository", "Type: Question" ]
  contributors:
    exclude:
      names: [ "dependabot" ]

Run the 0.0.5 version with the following command:

java -jar github-changelog-generator.jar  --changelog.milestone-reference=id --debug --spring.config.location=your-custom.yml 1 test.md

In this way you will have an error because the repository (in the configuration file) is not taken in count.
If you execute in the following way:

java -jar github-changelog-generator.jar --changelog.repository=mmornati/test-relese-notes --changelog.milestone-reference=id --debug --spring.config.location=your-custom.yml 1 test.md

It will work but without the custom labels from the milestone.

If you have any hint about it...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions