This repository has been archived by the owner on Dec 10, 2024. It is now read-only.
getContrastScore of 3.00 #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Move new issues to inbox | |
on: | |
issues: | |
types: [opened, reopened] | |
jobs: | |
add-to-inbox: | |
if: ${{ github.repository == 'primer/prism' && (github.event.action == 'opened' || github.event.action == 'reopened') }} | |
runs-on: ubuntu-latest | |
env: | |
# TODO: Swap out personal access token for a GitHub App token | |
GITHUB_TOKEN: ${{ secrets.GH_PAT }} | |
ISSUE_ID: ${{ github.event.issue.node_id }} | |
REACT_LABEL_ID: 'LA_kwDOHZEuLs8AAAABETw05A' | |
PROJECT_ID: 'PVT_kwDNJr_NNKA' | |
steps: | |
- name: Add react label to issue | |
run: | | |
gh api graphql --header 'GraphQL-Features: projects_next_graphql' -f query=' | |
mutation($reactLabelId: ID!, $issue: ID!) { | |
addLabelsToLabelable(input: { labelIds: [$reactLabelId], labelableId: $issue }) { | |
clientMutationId | |
} | |
}' -f reactLabelId=$REACT_LABEL_ID -f issue=$ISSUE_ID --jq '.data.addLabelsToLabelable.clientMutationId' | |
- name: Add issue to project | |
run: | | |
gh api graphql --header 'GraphQL-Features: projects_next_graphql' -f query=' | |
mutation($project:ID!,$issue:ID!) { | |
addProjectV2ItemById(input: {projectId: $project, contentId: $issue}) { | |
item { | |
id | |
} | |
} | |
}' -f project=$PROJECT_ID -f issue=$ISSUE_ID --jq '.data.addProjectNextItem.item.id' |