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

Change template variable URL doesn't get substituted #593

Closed
leouieda opened this issue Jul 17, 2020 · 8 comments
Closed

Change template variable URL doesn't get substituted #593

leouieda opened this issue Jul 17, 2020 · 8 comments

Comments

@leouieda
Copy link

First of all, thank you for making this!

I've been trying to use the $URL variable in the change-template but it doesn't seem to get replaced by the actual PR URL. This is the draft release that's being generated:

missing-url

The main reason I want it is so that I can copy the Markdown directly to the project website without having to replace the #123 with actual links.

Below is my configuration file:

# Configuration for the Release Drafter workflow
name-template: 'v$NEXT_PATCH_VERSION'
tag-template: 'v$NEXT_PATCH_VERSION'
change-template: '* $TITLE (#$NUMBER $URL by [@$AUTHOR](https://github.com/$AUTHOR))'
categories:
  - title: 'New functions/classes'
    label: 'feature'
  - title: 'Enhancements'
    label: 'enhancement'
  - title: 'Bug Fixes'
    label: 'bug'
  - title: 'Deprecations'
    label: 'deprecation'
  - title: 'Documentation'
    label: 'documentation'
  - title: 'Maintenance'
    label: 'maintenance'
exclude-labels:
  - 'skip-changelog'
template: |
  [![DOI](https://zenodo.org/badge/DOI/PASTE_DOI_HERE.svg)](https://doi.org/PASTE_DOI_HERE)
  ## Highlights
  * DELETE IF THERE ARE NO HIGHLIGHTS
  $CHANGES
  This release contains contributions from: $CONTRIBUTORS
@jetersen
Copy link
Member

#582 is not released yet. Would need to use the master branch if you want the feature.

@leouieda
Copy link
Author

Ah right, sorry about that. Thanks for the quick reply!

@jetersen
Copy link
Member

Should be released 😅

@jetersen
Copy link
Member

jetersen commented Jan 16, 2022

Though it is most likely using the API url and not the HTML url which is what you want ? 🗡️

NVM the https://docs.github.com/en/graphql/reference/objects#pullrequest uses the HTTP URL / HTML URL.

@jetersen jetersen reopened this Jan 16, 2022
@leouieda
Copy link
Author

Right, I think I'd want the URL of the repository. But #1017 should easily fix that. Thanks!

@jetersen
Copy link
Member

@leouieda see use case here:

template: |
# What's Changed
$CHANGES
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION

@jetersen
Copy link
Member

I decided against providing repository URL because of GHE and potentially github.io URLs. This allows for templating flexibility.

@leouieda
Copy link
Author

Agree 100%. Thanks!

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

2 participants