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

PILOT: HMW tune auto workflows so that CosmosSDK epics come through to this board? #11

Open
2 of 6 tasks
jonathanpberger opened this issue Jul 16, 2024 · 1 comment
Open
2 of 6 tasks
Assignees

Comments

@jonathanpberger
Copy link
Collaborator

jonathanpberger commented Jul 16, 2024

We believe the Interchain dev community
has a problem tracking dependencies across projects
and we can solve it w/ a Information Radiator showing the status of epics across the Core Dev repos
We'll know we're right if time-we're-blocked-by-external-teams goes down
And we'll know we're right if foreign PRs go up (bc it's easy to see where it'll be quicker just to patch a blocker yrself)


As ToT
We want CosmosSDK epics to come through to the IPW board
Because it's our Proof-of-concept


When the cron runs
Then all the CosmosSDK epics get added to IPW
And status should come through
And it should be idempotent


Todo

  • pull a "story type: Epic" story from Cosmos SDK into memory
  • push Epic into IPW Epics On The Interchain
  • sync Status field of foreign stories from a single repo (Cosmos SDK)
  • do it all for a 2nd (3rd, 4th, etc) repo
  • pull all Epics from Cosmos SDK into IPW Epics On The Interchain
  • make it a cron job

How To

Pull story status from CosmosSDK

  • brew install gh-cli
  • gh auth login
  • gh project list --owner cosmos --limit 11 (need explicit limit or get a pagination error from the API)

// Pull epics from foreign project
gh project item-list 26 --owner cosmos --format json -q '.items[] | select(.["story Type"] == "👑 Epic") | {title: .title, status: .status, storyType: .["story Type"], url: .content.url}'

// add single epic to IPW
gh project item-add 3 --owner interchainio --url https://github.com/cosmos/cosmos-sdk/issues/9958

assign "👑 Epic" status to Issue Story Type field in IPW

// get Issue ID
gh project item-list 3 --owner interchainio --limit 200 --format json | jq -r '.items[] | select(.content.url == "cosmos/cosmos-sdk#9958") | .id' # PVTI_lADOAsuzxc4AkKP5zgQ9Oxg

// get IPW Story Type field id

➜  dot-rot git:(master) ✗ gh project field-list --owner interchainio
? Which project would you like to use? Interchain Public Works (#3)
NAME                  DATA TYPE                   ID
Title                 ProjectV2Field              PVTF_lADOAsuzxc4AkKP5zgcaQn0
Assignees             ProjectV2Field              PVTF_lADOAsuzxc4AkKP5zgcaQn4
Status                ProjectV2SingleSelectField  PVTSSF_lADOAsuzxc4AkKP5zgcaQn8
Labels                ProjectV2Field              PVTF_lADOAsuzxc4AkKP5zgcaQoA
Linked pull requests  ProjectV2Field              PVTF_lADOAsuzxc4AkKP5zgcaQoE
Milestone             ProjectV2Field              PVTF_lADOAsuzxc4AkKP5zgcaQoI
Repository            ProjectV2Field              PVTF_lADOAsuzxc4AkKP5zgcaQoM
Reviewers             ProjectV2Field              PVTF_lADOAsuzxc4AkKP5zgcaQoc
Story Type            ProjectV2SingleSelectField  PVTSSF_lADOAsuzxc4AkKP5zgcaQoo

// get the project id

➜  dot-rot git:(master) ✗ gh project list --owner interchainio
NUMBER  TITLE                    STATE  ID
3       Interchain Public Works  open   PVT_kwDOAsuzxc4AkKP5

// get the IPW field value:

 dot-rot git:(master) ✗ gh project field-list 3 --owner interchainio --format json -q ".fields[]" | jq -r '. | select(.name == "Story Type").id'

PVTSSF_lADOAsuzxc4AkKP5zgcaQoo

// get the id of the single-select via --format json --single-select-option-id string

 dot-rot git:(master) ✗ gh project field-list 3 --owner interchainio --format json -q ".fields[]" | jq -r '. | select(.name == "Story Type").options[] | select(.name == "👑 Epic").id'

282f80fd

// assign "👑 Epic" status to Issue Story Type field in IPW

gh project item-edit --project-id PVT_kwDOAsuzxc4AkKP5 --id PVTI_lADOAsuzxc4AkKP5zgQ9Oxg --field-id PVTSSF_lADOAsuzxc4AkKP5zgcaQoo --single-select-option-id string 282f80fd


THIS SEEMS TO HAVE WORKED!!

➜  dot-rot git:(master) ✗ gh project field-list 3 --owner interchainio --format json -q ".fields[]" | jq -r '. | select(.name == "Story Type").id'

PVTSSF_lADOAsuzxc4AkKP5zgcaQoo
➜  dot-rot git:(master) ✗ gh project field-list 3 --owner interchainio --format json -q ".fields[]" | jq -r '. | select(.name == "Story Type").options[] | "\(.name): \(.id)"'

⭐️ User story: 9c507ef2
🐞 Bug: 9b62bd3f
⚙️ Chore: 5b9ce27f
👑 Epic: 282f80fd
🏁 Release Marker: bd1610fc
➜  dot-rot git:(master) ✗ gh project item-edit --project-id PVT_kwDOAsuzxc4AkKP5 --id PVTI_lADOAsuzxc4AkKP5zgQ9Oxg --field-id PVTSSF_lADOAsuzxc4AkKP5zgcaQoo --single-select-option-id 282f80fd

Edited item "EPIC: Separate x/auth and vesting"
➜  dot-rot git:(master) ✗


@jonathanpberger jonathanpberger converted this from a draft issue Jul 16, 2024
@jonathanpberger jonathanpberger moved this from 📋 Backlog to 🤸‍♂️ In Progress in Interchain Public Works Jul 16, 2024
@jonathanpberger
Copy link
Collaborator Author

Pull story status from CosmosSDK

  • brew install gh-cli
  • gh auth login
  • gh project list --owner cosmos --limit 11 (need explicit limit or get a pagination error from the API)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🤸‍♂️ In Progress
Development

No branches or pull requests

2 participants