Skip to content

x/build/gerrit: Parameter S is not supported? #24838

@michaeldorner

Description

@michaeldorner

QueryChangesOpt has the fields N and Fields, but is missing the Field Start (S, Gerrit API), as it is currently implemented for QueryAccountsOpt.

I think it is not too complicated to implement:

// QueryChangesOpt are options for QueryChanges.
type QueryChangesOpt struct {
	// N is the number of results to return.
	// If 0, the 'n' parameter is not sent to Gerrit.
	N int

	// Start is the number of results to skip (useful in pagination).
	// To figure out if there are more results, the last ChangeInfo struct
	// in the last call to QueryChanges will have the field MoreAccounts=true.
	// If 0, the 'S' parameter is not sent to Gerrit.
	Start int

	// Fields are optional fields to also return.
	// Example strings include "ALL_REVISIONS", "LABELS", "MESSAGES".
	// For a complete list, see:
	// https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#change-info
	Fields []string
}

// ...

err := c.do(ctx, &changes, "GET", "/changes/", urlValues{
	"q": {q},
	"n": condInt(opt.N),
	"o": opt.Fields,
	"S": condInt(opt.Start), // this is missing
})

Please let me know if I shall contribute this chance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Buildersx/build issues (builders, bots, dashboards)FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.help wanted

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions