-
Notifications
You must be signed in to change notification settings - Fork 24
Add docs on project automation #415
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
base: branch-25.10
Are you sure you want to change the base?
Add docs on project automation #415
Conversation
for more information, see https://pre-commit.ci
|
@jameslamb added you as a reviewer as you had previously seen much of this in #288 Just wanted to get some docs and the supporting helper script merged. |
jameslamb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine with me to add this to the repo. I didn't review too closely, but please see my one note about obscuring the GitHub token.
If you agree but don't have time to update this, let me know and I'll push here then merge this.
| """ | ||
| # Set up argument parser | ||
| parser = argparse.ArgumentParser(description='GitHub Project GraphQL Helper') | ||
| parser.add_argument('--token', '-t', required=True, help='GitHub personal access token') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Taken the token plaintext on the command line is unsafe. It risks leaving it behind in shell histories and making it visible in the output of process scans like ps aux.
Could you please rework this to instead look for the GH_TOKEN environment variable unconditionally?
Like this:
token = os.environ["GH_TOKEN"]It'd also be helpful to recommend the gh CLI in the instructions, to further discourage people from manually copying and pasting long-lived tokens.
Something like this:
gh auth login
export GH_TOKEN=$(gh auth token)
python ./docs/get-project-field-info.py --org rapidsai --project 128
This pull request adds documentation and a helper script to streamline and clarify the automation of GitHub Project management for RAPIDS repositories. The most significant changes include a new Python script for fetching project and field IDs via the GitHub GraphQL API, and a detailed README explaining the architecture, workflows, and configuration steps for project automation.
New helper script for project field discovery:
get-project-field-info.py, a Python script that queries the GitHub GraphQL API to retrieve project and field IDs, including options for single-select and iteration fields, while filtering out standard fields not controlled by the API. This script simplifies setup for workflow configuration.Documentation and workflow guidance:
project-automation-readme.md, a guide covering the challenges of GitHub Project automation, architectural overview of reusable workflows, step-by-step instructions for obtaining required IDs using the new script, and sample use cases for tracking PR progress.