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

Expand manifest-provision to also supply changelog files #77

Open
mikepurvis opened this issue Apr 18, 2016 · 1 comment
Open

Expand manifest-provision to also supply changelog files #77

mikepurvis opened this issue Apr 18, 2016 · 1 comment

Comments

@mikepurvis
Copy link
Contributor

I'm not sure what a reasonable CLI to this would be, but we have some internal tools which would benefit from "get me the changelog for X"-type functionality.

This could be a parallel set of functions to the manifest providers, but the overlap in what it needs to do is almost total. Between this and #66, I'm wondering if manifest_provider functionality could be reimagined as a suite of functions for get_package_xml, get_changelog, etc, possibly backed by functions for stuff like "contents of file from repo", "current state of repo" (with specializations for "supported" hosting providers).

Eg:

def get_package_xml(self):
  return self.impl_.get_file_contents(self.ref_, "package.xml")

def get_changelog(self):
  return self.impl_.get_file_contents(self.ref_, "CHANGELOG.rst")

def get_all_package_xml(self):
  with self.impl_.repo_checkout(self.ref_) as tmpdir:
    for ... in os.walk(tmpdir):
      # look for package XMLs.

Maybe there's an easier way to achieve this?

@dirk-thomas
Copy link
Member

That sounds good. The API behind could just take a parameter for a file relative to the package root. Then these two function can just call that single API implemented by each provider.

For a remote-only repository collecting all package.xml files will likely require a clone since listing is not always supported by the remote API.

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