plumming / dx Goto Github PK
View Code? Open in Web Editor NEWOnly use this repo if you have the chillies
License: Apache License 2.0
Only use this repo if you have the chillies
License: Apache License 2.0
Something like:
chilly get prs --here
or
chilly get prs .
It would be nice to be able to view all open issues across the configured repositories
It would be good to support gitlab.com and internal installs of gitlab, if we could do this, what commands could we support? Should we only support providers that provide a graphql endpoint to reduce traffic?
How would we restructure the configuration to support different SCM types?
repositories:
- name: github.com
kind: github
repos:
- plumming/dx
- name: github.myenterprise.com
kind: github
repos:
- xxx/something
- name: gitlab.com
kind: gitlab
repos:
- another/repo
dx get prs
GitLab refers to them as MRs, so adding that as an alias would make sense. I can't find a graphql query to do this in a single shot, may have to perform a request per repository. The following query may be enough to extract enough data for PRs.
{
project(fullPath: "org/repo") {
mergeRequests(first:50, state:opened) {
nodes {
iid
title
labels {
nodes {
title
}
}
mergeable
conflicts
createdAt
author {
name
}
approvalsRequired
approvalsLeft
}
}
}
}
if filtered > 0, where the filtered PRs are based on bot accounts / labels etc.
Should display something like:
N PR(s) have been filtered from this list, use --show-bots to view them
This is currently coming back as success.
FATAL: unable to run command: validate failed: failed to select namespace: while loading namespaces: failed to create kube client: no Auth Provider found for name "gcp"
touch ll && dx rebase
will currently fail as the command detects local changes, this should not be the case.
❯ grep -R "Run: func" *
cmd/dx/dx.go: Run: func(cmd *cobra.Command, args []string) {
cmd/dx/dx.go: Run: func(cmd *cobra.Command, args []string) {
pkg/cmd/editcmd/edit_config.go: Run: func(cmd *cobra.Command, args []string) {
pkg/cmd/editcmd/edit.go: Run: func(cmd *cobra.Command, args []string) {
pkg/cmd/upgradecmd/upgrade_cli.go: Run: func(cmd *cobra.Command, args []string) {
pkg/cmd/upgradecmd/upgrade.go: Run: func(cmd *cobra.Command, args []string) {
pkg/cmd/rebasecmd/rebase.go: Run: func(cmd *cobra.Command, args []string) {
pkg/cmd/deletecmd/delete.go: Run: func(cmd *cobra.Command, args []string) {
pkg/cmd/deletecmd/delete_repos.go: Run: func(cmd *cobra.Command, args []string) {
pkg/cmd/importcmd/import.go: Run: func(cmd *cobra.Command, args []string) {
pkg/cmd/importcmd/import_context.go: Run: func(cmd *cobra.Command, args []string) {
pkg/cmd/getcmd/get_repos.go: Run: func(cmd *cobra.Command, args []string) {
pkg/cmd/getcmd/get_prs.go: Run: func(cmd *cobra.Command, args []string) {
pkg/cmd/getcmd/get_issues.go: Run: func(cmd *cobra.Command, args []string) {
pkg/cmd/getcmd/get.go: Run: func(cmd *cobra.Command, args []string) {
pkg/cmd/namespacecmd/namespace.go: Run: func(cmd *cobra.Command, args []string) {
pkg/cmd/contextcmd/context.go: Run: func(cmd *cobra.Command, args []string) {
Could be an optional parameter? Or use it all the time?
As an initial query something like:
{
search(type:REPOSITORY, query: "repo:plumming/dx repo:jenkins-x/go-scm", first: 100) {
nodes {
... on Repository {
nameWithOwner
vulnerabilityAlerts(first: 10) {
totalCount
nodes {
securityAdvisory {
ghsaId
severity
summary
}
state
createdAt
dependabotUpdate {
pullRequest {
number
}
}
}
}
}
}
}
}
would do the job, filtering on all those issues that are state != "FIXED"
, optionally showing those advisories where a dependabot PR exists that can fix it.
e.g. dx context my-context
Current installation process of downloading the binary and adding to path doesn't work out of the box for MacOS Catalina. Stricter rules mean that trying to run chilly
from a fresh download prompts the following error:
"chilly" cannot be opened because the developer cannot be verified
So one has to control + click -> open the file in finder, approve running it, in order to execute the binary (or mess with security settings to allow all unknown developer apps to be opened).
When requesting my PRs, it may make sense to use the search query involves:xxx
rather than author:xxx
.
Would this be a better experience?
This can be tested using the command
dx get prs --raw involves:xxx
Showing 17 PR(s), Filtered .....
I don't know what the * ?
at the end of each row means. Worth highlighting with titles (which can be flagged/configured off)
Add to search query
reviews(first: 100) {
totalCount
nodes {
comments {
totalCount
}
}
}
{
search(type:REPOSITORY, query: "...", first: 100) {
nodes {
... on Repository {
nameWithOwner
url
hasVulnerabilityAlertsEnabled
}
}
}
}
Then use the flag --show-bots
to enable all bot users.
This should appear in dx edit config
with the defaults set to dependabot
& dependabot-preview
Error is: first path segment in URL cannot contain colon
It currently just calls the functions and expects them not to fail. It should assert something but i was having issues working out how to stub out the exec.LookupPath
function
Auth has been hardcoded to use github.com
If brew is installed, and dx is listed in brew list
then we should prompt to use the brew upgrade dx
command rather that dx upgrade cli
change all references of chilly
to dx
in:
At the moment this is hardcoded to 100, we should make this configurable in the config
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.