Skip to content

Conversation

@jarmak-nv
Copy link
Contributor

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:

  • Added 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:

  • Introduced 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.

@jarmak-nv jarmak-nv requested a review from a team as a code owner August 27, 2025 16:21
@jarmak-nv jarmak-nv added doc Improvements or additions to documentation non-breaking Introduces a non-breaking change labels Aug 27, 2025
@jarmak-nv
Copy link
Contributor Author

@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.

Copy link
Member

@jameslamb jameslamb left a 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')
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Improvements or additions to documentation non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants