Code Monkey home page Code Monkey logo

anvil's People

Contributors

ghighland avatar luigiberrettini avatar posborne avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

anvil's Issues

Repo: Track down changesets from bug id

Api/{version}/Bug/{ixBug} (GET)

Returns a list of changeset records readable by the user. A changeset is readable if it belongs to at least one repository readable by the user. This list corresponds to all the changesets associated with ixBug, a FogBugz case number.

RepoAlias: Add support for CRUD on repository aliases

https://developers.fogbugz.com/default.asp?W190

Repository Aliases

New in Kiln 2.4

Repositories aliases allow you to create a URL that points to a target repository, which is allowed to change while the alias' URL remains the same. Kiln provides a full read and write API to repo aliases.

Api/{version}/RepoAlias/Create (POST)

Creates a repository alias with the specified name for the given repository. You must be a project administrator to create an alias in a project.

Takes the following parameters:

ixRepo (required): the repository to attach the alias to.
sName (required): the name of the alias. May contain word characters, hyphens, and parentheses (i.e. must match ^[\w- ()]+$)
Returns a repository alias record. The alias's URL will be http://your.kilnhg.com/RepoAlias/sProject/sSlug, where sProject is the slug of repository's project, and the sSlug is the slug of the alias's name.

Api/{version}/RepoAlias/{ixRepoAlias} (GET)

Returns the repository alias record. Requires read permissions to the repository's project.
Api/{version}/RepoAlias/{ixRepoAlias} (POST)

Updates the specified alias. Takes either or both of the following parameters (see descriptions for Create method, above):
ixRepo
sName
Any parameter that is not specified remains unchanged. Requires administrator permissions on the repository's project.

Api/{version}/RepoAlias/{ixRepoAlias}/Delete (POST)

Deletes the specified alias. Requires administrator permissions on the associated repository's project. Returns true on success.
Api/{version}/RepoAlias/Find (GET)

Returns the repository alias record by that matches the given project slug and alias slug. Takes the following parameters:
sProjectSlug (required): slugified project name
sAliasSlug (required): slugified alias name
This method is useful for fetching an alias record if you have the alias's Kiln URL; for instance, the alias record for the alias at http://your.kilnhg.com/RepoAlias/my-project/my-alias will be found at http://your.kilnhg.com/Api/1.0/RepoAlias/Find?sProjectSlug=my-project&sAliasSlug=my-alias.

Repo: Add support for getting tags

Api/{version}/Repo/{ixRepo}/Tags (GET)

Requires read permissions to the repository. Returns an array of tag records that belong to ixRepo. (Kiln 2.7.5 and higher only)

Repo: Add support for commiting to repo

Api/{version}/Repo/{ixRepo}/Commit (POST)

Commits files to ixRepo. Files are committed directly to the repository and do not need to be pushed by the user. Uses multipart/form-data and takes

ixPerson: the author of the commit (optional; defaults to current user)
revParent1: the first parent changeset of the new commit (optional; defaults to tip)
revParent2: the second parent changeset of the new commit; used when merging (optional; defaults to none)
dt: the date of the commit (optional, defaults to the user's current day and time)
sMessage: commit message
: (at least one file must be given)
and returns the new revision which does not guarantee the backend has added the changeset yet. This is an asynchronous call. You should poll Api/{version}/Repo/{ixRepo}/History/{the new rev} until the new changeset is returned to determine when the backend has finished. (Kiln 2.7.5 and higher only)

Repo: Add support for updating repo metadata

Api/{version}/Repo/{ixRepo} (POST)

You need to be the repository creator or have administrator permissions to modify a branch repository; you need to have administrator permissions to modify a central repository. Takes

sName: the new repository name
sDescription: the new repository description
ixRepoGroup: the new repository group to move the repository
ixParent: the new repository parent (you must have read permission to the new parent).
Kiln 2.5.96 and higher only: Specify 0 to set the repository's parent to None (null).
fCentral: if true, converts the branch repository into a central repository (can only be set for branch repositories)
permissionDefault: the new default repository permission
(All optional.) and updates the repository with the fields. Returns the updated repository record.

Repo: Add support for getting named branches

Api/{version}/Repo/{ixRepo}/NamedBranches (GET)

Requires read permissions to the repository. Returns an array of NamedBranch records corresponding to ixRepo. (Kiln 2.7.5 and higher only)

Reviews: Add support for querying reviews

Api/{version}/Reviews (GET)

Returns a record containing the keys

reviewsAssignedToMe: a list of open review records without changesets assigned to you (Deprecated in Kiln 2.5.9)
reviewsOpenedByMe: a list of open review records without changesets opened by you
reviewsReviewedByMe: a list of review records without changesets corresponding to reviews in which you are a reviewer, excluding reviews in reviewsOpenedByMe (Kiln 2.5.9 and up)
The reviews in the returned record are the same as the reviews in the review menu dropdown.

Repo: Add support for retrieving history

https://developers.fogbugz.com/default.asp?W166


Api/{version}/Repo/{ixRepo}/History (GET)

Requires read permissions to the repository. Takes

revs: a list of requested revisions from the same repository (optional; Kiln 2.7.5 and higher only)
revOldest: revision of the oldest changeset to return (optional)
nChangesetLimit: number of changesets to return, with a maximum of 100 (optional; defaults to 10)
and returns a list of the requested changesets corresponding to the revisions "revs". If revs is omitted, changeset records from the repository history, analogous to "hg log" are returned. If revOldest is omitted, the call returns "nChangesetLimit" records starting from the tip and working backward.

Reviews: Add Support for Creating Review

Api/{version}/Review/Create (POST)

Requires read permissions to the repository. Takes

ixRepo: the repository to create the new review against
revs: a list of revisions to review (Kiln 2.5.141 and higher only; see Deprecation Notice below)
ixReviewers: a list of people to add as reviewers (Kiln 2.4.101 and higher only; see Deprecation Notice below)
sTitle: the title of the new review (optional)
sDescription: the initial comment of the new review (optional)
and returns the new review's review record.

Repo: Add support for pushing to another repo

Api/{version}/Repo/{ixRepo}/Push/{ixTargetRepo} (POST)

Where ixTargetRepo is the target repository to push to. Requires read permissions to the ixRepo source repository and write permissions to to the ixTargetRepo target repository. The target repository must contain a strict subset of the changesets in the source repository; the source must be related to the target; and the push must not create new heads in the target. Takes no other parameters. Returns true on success.

Reviews: Add support for changing review status

Api/{version}/Review/{ixReview} (POST)

Takes

sStatus: the new review status (one of "approved", "rejected", "wontreview"; optional)
fClose: whether to close the review (optional; defaults to false)
fReopen: whether to reopen the review (optional; defaults to true)
and returns the updated review record with changesets. Note that some combinations of parameters are conflicting, such as closing and reopening a review at the same time. To address this, we simply mandate that "fReopen" being true takes first precedence. A review closes in the "approved" state unless otherwise specified by "sStatus".

Repo: Add support for creating a repo

Api/{version}/Repo/Create (POST)

You need to be a project administrator to create a central repository. You need to have at least project write permissions to the project to create a branch repository. Takes

sName (required): the new repository name
sDescription (optional): the new repository description
ixRepoGroup (required): the repository group the new repository will belong to
ixParent (optional; if given, the ixParent repository will be branched to create the new repository): the parent repository
fCentral (optional; defaults to true): true if the new repository should be central; false otherwise
permissionDefault (optional; defaults to "none"): the default repository permission, one of "none", "read", or "modify"
Returns the new repository's repository record, which does not guarantee the backend has created the repository yet. This is an asynchronous call. You should poll Api/{version}/Repo/{ixRepo} until "sStatus" becomes "good" to determine when the backend has finished. This call will be slower if the backend needs to branch a parent repository.

Important note: Setting ixParent on this call is how you branch repositories through the API.

As of Kiln 2.5.171: You can now also create branch repositories with project read + write permissions. (A previous announcement regarding this feature in 2.5.96 was incorrect due to a bug in the implementation; we apologize for this error.)

Repo: Add support for retrieving a file from repo

Api/{version}/Repo/{ixRepo}/File/{bpPath} (GET)

Requires read permissions to the repository. Takes

rev: the revision to read the file from (optional; default to tip)
fAnnotate: if true, returns annotation records as well (optional; defaults to false)
and returns the cat record corresponding to the file at "bpPath" at revision "rev", analogous to "hg cat". Note that "bpPath" must be an encoded byte path; see the API Idioms page for details.

Project: Add support for creating projects

To this point, I haven't had this use case but it would be a great starter feature to add to the project for anyone needing this support:

From Kiln API Docs (https://developers.fogbugz.com/default.asp?W164)


Api/{version}/Project/{ixProject} (POST)

You must be an administrator to write to a project. Takes

sName: the new project name (optional)
sDescription: the new project description (optional)
permissionDefault: the new default project permission (optional)
and updates the fields on the project corresponding to "ixProject". Returns the updated project record.

Repo: Add support for Related Repo Queries

NOTE: I don't really understand this feature so it seems low priority


Api/{version}/Repo/Related (GET)

Takes
revTails: a list of revision tails
and returns a list of repository records that contains a tail from "revTails" and are readable by the user.

Api/{version}/Repo/{ixRepo}/Related (GET)

Requires read permissions to the repository. Returns a list of repository records that are related to the repository corresponding to "ixRepo" and are readable by the user.

Add support for "where used" repositories

Idea here would be to look for .hgsub files in all repos that point to a particular repo. Thinking it would be implemented as a where_used function in the KilnRepo class in entities.py that returns a list of repos that have the current repo listed as a subrepo.

Repo: Add support for deleting a Repo

Api/{version}/Repo/{ixRepo}/Delete (POST)

You need to be the repository creator or have administrator permissions to delete a branch repository; you need to have administrator permissions on the repository and the project to delete a central repository. Repositories can be undeleted by a project administrator from the website user interface.

Repo: Add ability to create/remove fogbugz case links

Api/{version}/Repo/{ixRepo}/CaseAssociation/Create(POST)

Requires write permissions to the repository. Associates a list of changesets with a case or review. Takes

revs: the list of revisions to associate
ixBug: the case to associate
and returns the updated changesets. (Kiln 2.7.5 and higher only)

Api/{version}/Repo/{ixRepo}/CaseAssociation/Delete(POST)

Requires write permissions to the repository. Dissociates a list of changesets with a case or review. Takes

revs: the list of revisions to dissociate
ixBug: the case to dissociate
and returns the updated changesets. (Kiln 2.7.5 and higher only.)

Repo: Add ability to query manifest of a repo

This should go along with the ability to grab a file


Api/{version}/Repo/{ixRepo}/Manifest (GET)

Requires read permissions to the repository. Takes

rev: the revision to read the manifest from (optional; defaults to tip)
and returns a list of manifest records at revision "rev".

Repo: Add support for querying outgoing

Api/{version}/Repo/{ixRepo}/Outgoing (GET)

Requires read permissions to the repository. Takes
ixOtherRepo: the repository to compare to
revOlderThan: only include changesets older than this outgoing changeset (optional; defaults to tip)
nChangesetLimit: the number of changesets to return (optional; defaults to 30)
and returns a list of outgoing changeset records.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.