Skip to content

Add GitHub CLI Features#12

Merged
whusterj merged 2 commits intomainfrom
github-features
Sep 20, 2024
Merged

Add GitHub CLI Features#12
whusterj merged 2 commits intomainfrom
github-features

Conversation

@whusterj
Copy link
Member

@whusterj whusterj commented Sep 17, 2024

What This Does

I'm constantly jumping from PR page to PR page to check project status. Opening a browser and auth'ing with GitHub can be slow and tedious. This feature enables you to configure a list of projects by repo name and list all open PRs.

It makes for a good overview and checklist-builder. Since links are clickable in the terminal, you can jump straight to any PR of interest.

Adds the following recipes:

  1. "Quickstart" recipe to install GitHub CLI (gh).
  2. "Quickstart" recipe to auth with GitHub CLI.
  3. Recipe to list PRs for a single project
  4. A .config file for user-specific preferences - in this case a PROJECTS list of ThinkNimble repos to "watch".
  5. Recipe to iterate the list of PROJECTS from .config

To Do:

  • Add basic recipes for GH install, auth, and PR listing

Example of listing PRs for multiple projects:

image

@whusterj
Copy link
Member Author

@paribaker @oudeismetis @mayakeeley - Would appreciate input and/or feature suggestions.

@whusterj whusterj self-assigned this Sep 17, 2024
&& sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
&& sudo apt update \
&& sudo apt install gh -y
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh, Ubuntu install steps are ugly.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea of having the entire script in view in the primary justfile, but it may be a better standard to move each of these out to a library of scripts and have the justfile simply wrap them.

exit 1
fi
bunx @thinknimble/tnm-cli read '{{project_url}}/api/schema/?format=yaml' -t '{{api_key}}' -u '{{endpoint}}' No newline at end of file
bunx @thinknimble/tnm-cli read '{{project_url}}/api/schema/?format=yaml' -t '{{api_key}}' -u '{{endpoint}}'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The endpoint can also just be the physical file if someone has it downloaded, but I most likely folks will use the link

@@ -0,0 +1 @@
PROJECTS=delve,equati,data4living,project_basta No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this needed or can we pass things as CLI args?

Copy link
Member Author

@whusterj whusterj Sep 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tn gh-all-prs command uses this, but I could change that to accept a list of args, too. You can pass project names one-by-one to tn gh-prs $repo

I'll write some docs / a manual page for the commands.

Copy link
Member Author

@whusterj whusterj Sep 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm also open to better ideas for how to do this. My use case is that I want to "watch" a certain set of projects and then change the list over time.

@whusterj whusterj mentioned this pull request Sep 20, 2024
3 tasks
@whusterj whusterj merged commit 29793ec into main Sep 20, 2024
@whusterj whusterj deleted the github-features branch September 20, 2024 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants