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

Set the description for deployments to GitHub releases #8568

Closed
Midnighter opened this issue Oct 11, 2017 · 5 comments
Closed

Set the description for deployments to GitHub releases #8568

Midnighter opened this issue Oct 11, 2017 · 5 comments

Comments

@Midnighter
Copy link

I didn't see anything in the documentation or examples out on the web about how to actually provide a description for a release deployment. With one of our repositories, we keep markdown files with release notes in a directory so ideally I could copy one of those markdown files (or have its contents copied) to the release description on GitHub.

@BanzaiMan
Copy link
Contributor

What do you mean by "description"? If you mean the "body" of the release (https://developer.github.com/v3/repos/releases/#create-a-release), this is handled in https://docs.travis-ci.com/user/deployment/releases#Advanced-options. We could consider explaining what advanced options are, but at the risk of getting out of sync from time to time.

@Midnighter
Copy link
Author

That's exactly what I need! I was browsing the page for any option that looked like it might allow me to pass in a description but I missed the link to the Octokit API. Thank you.

A short description of the possible options probably would have helped me but I understand your concern about getting out of date.

@Midnighter
Copy link
Author

Okay, I was a bit too quick to declare success.

I tried three different cases and I'm not quite there yet:

  1. When I configure a description directly in the .travis.yml I have no problems and it works:
    body: "a simple description"
  2. When I try to do something more complicated with newlines, I get a literal \n in the release.
    body: "a description\non multiple lines"
    You can see the result in my test repo.
  3. What I'm really trying to do, though, is to pass in the content of a markdown file.
    export TAG_NOTES=$(cat awesome.md)
    body: $TAG_NOTES
    However, then I get an error with the GitHub API: invalid option "--body=# Header\n\n* Nice list\n\nParagraph 3" as you can see in these logs.

@Midnighter Midnighter reopened this Oct 12, 2017
@Midnighter
Copy link
Author

Midnighter commented Oct 12, 2017

Found the following related issue travis-ci/dpl#155 but didn't spot a solution that didn't involve writing my own deploy release script.

@BanzaiMan
Copy link
Contributor

Closing as a duplicate of the dpl issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants