Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
e48fe84
/version 0.8.0a0
Apr 3, 2024
bd8e7f9
Update README.md
jamesfwood Sep 30, 2025
d6ed9a4
/version 0.8.0a1
jamesfwood Sep 30, 2025
f2a9a21
Update README.md
jamesfwood Sep 30, 2025
2e1a4a0
/version 0.8.0a2
jamesfwood Sep 30, 2025
ca5b010
Update README.md
jamesfwood Sep 30, 2025
d12ba05
/version 0.8.0a3
jamesfwood Sep 30, 2025
d962b6d
Add automatic project assignment workflow
tloubrieu-jpl Feb 13, 2026
9d07cfe
/version 0.8.0a4
tloubrieu-jpl Feb 13, 2026
e61dc67
Add automatic team/project assignment workflow
tloubrieu-jpl Mar 14, 2026
2573f6c
/version 0.8.0a5
tloubrieu-jpl Mar 14, 2026
80198f6
Add automatic team/project assignment workflow
tloubrieu-jpl Mar 14, 2026
33d1c03
/version 0.8.0a6
tloubrieu-jpl Mar 14, 2026
6e00183
Remove workflow: add-to-project.yml
tloubrieu-jpl Apr 12, 2026
d77226a
/version 0.8.0a7
tloubrieu-jpl Apr 12, 2026
c6005a3
Deploy workflow: org-add-to-project.yml
tloubrieu-jpl Apr 12, 2026
29f9784
/version 0.8.0a8
tloubrieu-jpl Apr 12, 2026
2e6fc76
Deploy workflow: org-close-pr-status.yml
tloubrieu-jpl Apr 12, 2026
5a14bf3
/version 0.8.0a9
tloubrieu-jpl Apr 12, 2026
a83dd97
Remove workflow: team-assignment.yml
tloubrieu-jpl Apr 12, 2026
85846c1
/version 0.8.0a10
tloubrieu-jpl Apr 12, 2026
ba37607
Deploy workflow: org-team-assignment.yml
tloubrieu-jpl Apr 12, 2026
f0dc6a3
/version 0.8.0a11
tloubrieu-jpl Apr 12, 2026
c4993dc
update libraries and to python 3.12 (#39)
sliu008 Jul 31, 2026
059b8c6
update changelog
sliu008 Jul 31, 2026
533c562
/version 0.8.0rc1
sliu008 Jul 31, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ on:


env:
POETRY_VERSION: "1.7.1"
PYTHON_VERSION: "3.10"
POETRY_VERSION: "2.3.2"
PYTHON_VERSION: "3.12"

jobs:
# First job in the workflow installs and verifies the software
Expand All @@ -43,22 +43,22 @@ jobs:
with:
app_id: ${{ secrets.CICD_APP_ID }}
private_key: ${{ secrets.CICD_APP_PRIVATE_KEY }}
- uses: actions/checkout@v4
- uses: actions/checkout@v7
with:
repository: ${{ github.repository }}
token: ${{ steps.podaac-cicd.outputs.token }}
- uses: actions/setup-python@v5
- uses: actions/setup-python@v6
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Poetry
uses: abatilo/actions-poetry@v3
uses: abatilo/actions-poetry@v4
with:
poetry-version: ${{ env.POETRY_VERSION }}
- name: Setup a local virtual environment
run: |
poetry config virtualenvs.create true --local
poetry config virtualenvs.in-project true --local
- uses: actions/cache@v4
- uses: actions/cache@v6
name: Define a cache for the virtual environment based on the dependencies lock file
with:
path: ./.venv
Expand Down
129 changes: 129 additions & 0 deletions .github/workflows/org-add-to-project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# used to triage new issues and PRs on project board, so not to miss external feedback or contributions of users.
name: Add to PODAAC Project


on:
issues:
types: [opened]
pull_request:
types: [opened]
Comment on lines +5 to +9

jobs:
add-to-project:
runs-on: ubuntu-latest
steps:
- name: Add to project
uses: actions/add-to-project@v0.5.0
with:
project-url: https://github.com/orgs/podaac/projects/75
github-token: ${{ secrets.PROJECTS_PAT }}

- name: Set status to needs:triage
uses: actions/github-script@v7
with:
github-token: ${{ secrets.PROJECTS_PAT }}
script: |
const projectNumber = 75; // Update this with your actual project number
const org = 'podaac';

// Get the project ID
const projectQuery = `
query($org: String!, $number: Int!) {
organization(login: $org) {
projectV2(number: $number) {
id
fields(first: 20) {
nodes {
... on ProjectV2SingleSelectField {
id
name
options {
id
name
}
}
}
}
}
}
}
`;

const projectData = await github.graphql(projectQuery, {
org: org,
number: projectNumber
});

const project = projectData.organization.projectV2;
const statusField = project.fields.nodes.find(field => field.name === 'Status');
const triageOption = statusField?.options.find(option => option.name === 'needs:triage');

if (!triageOption) {
core.warning('Could not find "needs:triage" status option');
return;
}

// Get the item ID that was just added
const itemType = context.eventName === 'issues' ? 'Issue' : 'PullRequest';
const itemNumber = context.payload.issue?.number || context.payload.pull_request?.number;

const itemQuery = `
query($org: String!, $repo: String!, $number: Int!) {
repository(owner: $org, name: $repo) {
${itemType === 'Issue' ? 'issue' : 'pullRequest'}(number: $number) {
projectItems(first: 10) {
nodes {
id
project {
id
}
}
}
}
}
}
`;

const itemData = await github.graphql(itemQuery, {
org: org,
repo: context.repo.repo,
number: itemNumber
});

const items = itemType === 'Issue'
? itemData.repository.issue.projectItems.nodes
: itemData.repository.pullRequest.projectItems.nodes;

const projectItem = items.find(item => item.project.id === project.id);

if (!projectItem) {
core.warning('Could not find project item');
return;
}

// Update the status field
const updateMutation = `
mutation($projectId: ID!, $itemId: ID!, $fieldId: ID!, $value: String!) {
updateProjectV2ItemFieldValue(
input: {
projectId: $projectId
itemId: $itemId
fieldId: $fieldId
value: { singleSelectOptionId: $value }
}
) {
projectV2Item {
id
}
}
}
`;

await github.graphql(updateMutation, {
projectId: project.id,
itemId: projectItem.id,
fieldId: statusField.id,
value: triageOption.id
});

core.info('Successfully set status to needs:triage');
127 changes: 127 additions & 0 deletions .github/workflows/org-close-pr-status.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
# Directly move the closed PR to a close status in the PODAAC project
# to avoid unnecessary clutter and manual triage in the "needs:triage" column.
name: Update Closed PR Status in PODAAC project

on:
pull_request:
types: [closed]
Comment on lines +5 to +7

jobs:
update-pr-status:
runs-on: ubuntu-latest
steps:
- name: Set status to closed
uses: actions/github-script@v7
with:
github-token: ${{ secrets.PROJECTS_PAT }}
script: |
const projectNumber = 75;
const org = 'podaac';
const prNumber = context.payload.pull_request.number;
const isMerged = context.payload.pull_request.merged;

console.log(`PR #${prNumber} was ${isMerged ? 'merged' : 'closed without merging'}`);

// Get the project ID and status field information
const projectQuery = `
query($org: String!, $number: Int!) {
organization(login: $org) {
projectV2(number: $number) {
id
fields(first: 20) {
nodes {
... on ProjectV2SingleSelectField {
id
name
options {
id
name
}
}
}
}
}
}
}
`;

const projectData = await github.graphql(projectQuery, {
org: org,
number: projectNumber
});

const project = projectData.organization.projectV2;
const statusField = project.fields.nodes.find(field => field.name === 'Status');
const closedOption = statusField?.options.find(option => option.name === 'closed');

if (!closedOption) {
core.warning('Could not find "closed" status option in project');
return;
}

// Get the PR's project item
const itemQuery = `
query($org: String!, $repo: String!, $number: Int!) {
repository(owner: $org, name: $repo) {
pullRequest(number: $number) {
projectItems(first: 10) {
nodes {
id
project {
id
}
}
}
}
}
}
`;

const itemData = await github.graphql(itemQuery, {
org: org,
repo: context.repo.repo,
number: prNumber
});

const items = itemData.repository.pullRequest.projectItems.nodes;
const projectItem = items.find(item => item.project.id === project.id);

if (!projectItem) {
console.log('PR is not in the project, skipping status update');
return;
}

// Update the status field to "closed"
const updateMutation = `
mutation($projectId: ID!, $itemId: ID!, $fieldId: ID!, $value: String!) {
updateProjectV2ItemFieldValue(
input: {
projectId: $projectId
itemId: $itemId
fieldId: $fieldId
value: { singleSelectOptionId: $value }
}
) {
projectV2Item {
id
}
}
}
`;

await github.graphql(updateMutation, {
projectId: project.id,
itemId: projectItem.id,
fieldId: statusField.id,
value: closedOption.id
});

console.log(`✅ Successfully set status to "closed" for PR #${prNumber}`);

core.summary
.addHeading(`PR Status Updated`)
.addList([
`PR #${prNumber} was ${isMerged ? 'merged' : 'closed'}`,
`Project status updated to "closed"`
])
.write();
Loading
Loading