Skip to content

Commit

Permalink
fix(init): fix config generated by init
Browse files Browse the repository at this point in the history
  • Loading branch information
suzuki-shunsuke committed Jan 18, 2025
1 parent b70aab0 commit 3d504a2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 24 deletions.
2 changes: 1 addition & 1 deletion pkg/controller/add/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type Config struct {
type Entry struct {
ProjectID string `json:"project_id" yaml:"project_id" jsonschema:"description=GitHub Project id"`
Action string `json:"action,omitempty" jsonschema:"description=Set 'archive' if you want to archive items"`
Query string `json:"query" jsonschema:"description=GitHub GraphQL Query to search issues and pull requests"`
Query string `json:"query,omitempty" jsonschema:"description=GitHub GraphQL Query to search issues and pull requests"`
Expr string `json:"expr,omitempty" jsonschema:"description=An expression to filter the search result"`
exprProg *vm.Program
}
Expand Down
41 changes: 18 additions & 23 deletions pkg/controller/initcmd/init.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,22 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/suzuki-shunsuke/ghproj/refs/heads/main/json-schema/ghproj.json
# ghproj https://github.com/suzuki-shunsuke/ghproj
entries:
- user: suzuki-shunsuke
# type: issue, pr
# title
# label
# repository name
# repository properties
# state: open, closed
# merged: true/false
# datetime created, updated, closed, merged
# OR
- project_id: PVT_XXXXXXXXXXXXXXXX
query: |
user:suzuki-shunsuke -label:renovate
project_number: 5
types:
- issue
- pr
repositories:
- foo
excluded_repositories:
- foo
excluded_labels:
- renovate
- org: aquaproj
project_number: 5
is:open
is:public
archived:false
-project:szksh-lab/1
owner:szksh-lab
owner:suzuki-shunsuke
expr: |
(! Item.Repo.IsFork) &&
(Item.Title != "Dependency Dashboard") &&
! (Item.Repo.Name startsWith "homebrew-") &&
! (Item.Repo.Name startsWith "test-")
# Archive items
- action: archive
project_id: PVT_XXXXXXXXXXXXXXXX
expr: |
Item.Repo.IsArchived

0 comments on commit 3d504a2

Please sign in to comment.