Skip to content

Commit

Permalink
Update issue_triage.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Mayank77maruti authored Dec 19, 2024
1 parent 22d1284 commit 7471e37
Showing 1 changed file with 0 additions and 56 deletions.
56 changes: 0 additions & 56 deletions .github/workflows/issue_triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,59 +54,3 @@ jobs:
core.setOutput('projectValid', true);
core.setOutput('projectTitle', projects[0].project.title);
}
- name: Move Issue to "In Progress" on Self-Assignment
if: ${{ github.event.action == 'assigned' && github.event.assignee.login == github.actor && steps.check-projects.outputs.projectValid == 'true' }}
uses: actions/github-script@v6
with:
script: |
const query = `
query($owner: String!, $repo: String!, $issueNumber: Int!) {
repository(owner: $owner, name: $repo) {
issue(number: $issueNumber) {
projectItems(first: 100) {
nodes {
id
project {
title
}
}
}
}
}
}
`;
const variables = {
owner: context.repo.owner,
repo: context.repo.repo,
issueNumber: context.issue.number
};
const result = await github.graphql(query, variables);
const projectItem = result.repository.issue.projectItems.nodes[0];
if (projectItem) {
const projectItemId = projectItem.id;
await github.graphql(`
mutation($projectItemId: ID!, $status: String!) {
updateProjectV2ItemFieldValue(
input: {
projectId: $projectItemId,
fieldId: "Status",
value: $status
}
) {
projectV2Item {
id
}
}
}
`, {
projectItemId,
status: "In Progress"
});
console.log(\`Moved issue to 'In Progress' in project: \${projectItem.project.title}\`);
}

0 comments on commit 7471e37

Please sign in to comment.