Skip to content

chore: add workflow to add new issues to engineering project #124

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

Merged
merged 1 commit into from
May 23, 2025
Merged
Changes from all commits
Commits
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
32 changes: 32 additions & 0 deletions .github/workflows/add-issues-to-engineering-project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Add New Issue to Engineering Project

on:
issues:
types: [opened]

jobs:
add_issue_to_project:
runs-on: ubuntu-latest
steps:
- name: Add issue to project
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GH_TOKEN_ADD_TO_ENG_PROJECT }}
script: |
const issueId = context.payload.issue.node_id;
const projectId = '22';

const mutation = `
mutation {
addProjectV2ItemById(input: {
projectId: "${projectId}",
contentId: "${issueId}"
}) {
item {
id
}
}
}
`;

await github.graphql(mutation);