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

changelog (and potentially other commands) can't handle working from branches #2

Open
Cryptophobia opened this issue Mar 20, 2018 · 9 comments
Labels

Comments

@Cryptophobia
Copy link
Member

From @helgi on August 20, 2016 21:2

I had to release v2.4.1 and base if of v2.4.0 instead of master / workflow-dev. When I went to the changelog individual phase then that command got rather confused.

The way I created my branch in Controller was to create a stable-v2.4.1 (name doesn't really matter much) from the v2.4.0 tag, cherry-pick changes from master that I wanted released (note that in other cases special commits may have to be done since cherry-pick may not always work).

I did not push the branch up. When I ran changelog individual then it tried to pull info from master... I tried --base-tag and --sha but it wasn't very clear what was what.

Maybe this is all side effect of always working against the GH API? Maybe I should have pushed my branch?

Copied from original issue: deis/deisrel#130

@Cryptophobia
Copy link
Member Author

From @vdice on August 23, 2016 20:50

Maybe this is all side effect of always working against the GH API? Maybe I should have pushed my branch?

@helgi I think indeed this is the issue. @Joshua-Anderson thoughts?

@Cryptophobia
Copy link
Member Author

From @Joshua-Anderson on August 23, 2016 20:54

Yes, you needed to push your branch before using deisrel to generate a changelog.

@Cryptophobia
Copy link
Member Author

From @Joshua-Anderson on August 23, 2016 20:54

@helgi is this behavior ok or would you like to see something different?

@Cryptophobia
Copy link
Member Author

From @helgi on August 23, 2016 21:2

Not really sure why I'd have to push - So we can use GH HTTP APIs instead of dropping down to git mechanics?

@Cryptophobia
Copy link
Member Author

From @Joshua-Anderson on August 23, 2016 21:5

We use the GH api to get the commit diff between the old tag and the SHA of the new tag. If the new sha doesn't exist, it can't calculate the range.

We could use raw git, but it's less deterministic (different checkouts, haven't pulled) and parsing the output from the git CLI is much more difficult than using the GH Go SDK.

@Cryptophobia
Copy link
Member Author

From @helgi on August 23, 2016 21:8

The tool will still have to verify the branch has been pushed and all that, which would involve git operations, no?

@Cryptophobia
Copy link
Member Author

From @Joshua-Anderson on August 23, 2016 21:10

I'd see this workflow for a patch release:

  1. Person creates new branch from old tag, cherrypicks changes and pushes to GH for verification and testing by other people.
  2. Person uses deisrel to generate diff between the old tag and the new SHA.
  3. Person creates new tag with created changelog.

@Cryptophobia
Copy link
Member Author

From @helgi on August 23, 2016 21:16

Alright but that doesn't really answer my question - The tool needs to be able to enforce certain steps happen and let you know when they do not. Such as "you have not pushed your branch" and similar.

@Cryptophobia
Copy link
Member Author

From @Joshua-Anderson on August 23, 2016 21:35

The tool needs to be able to enforce certain steps happen and let you know when they do not. Such as "you have not pushed your branch" and similar.

I'd personally feel this is more of a documentation problem than a deisrel problem. Is there much that can be done in deisrel to check for this? I guess we could clean up the message to say "could not find SHA, has it been pushed to github"?

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

No branches or pull requests

1 participant