Skip to content
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

53 auto backlog #54

Merged
merged 1 commit into from
Sep 5, 2023
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
29 changes: 15 additions & 14 deletions .github/workflows/todo.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
name: Assign "à faire" Label to New Issues
name: Ajouter une nouvelle issue à la backlog

on:
issues:
types:
- opened

jobs:
assign-label:
add_to_backlog:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Add "🆕 A Faire" label
run: |
ISSUE_NUMBER=$(jq --raw-output .issue.number "$GITHUB_EVENT_PATH")
echo "Adding 'à faire' label to issue #$ISSUE_NUMBER"
gh issue edit $ISSUE_NUMBER --add-label "à faire"

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE_NUMBER: ${{ github.event.issue.number }}
- name: Ajouter l'issue à la backlog
uses: actions/github-script@v4
with:
script: |
const backlogProjectId = 1;
const issueNumber = context.payload.issue.number;

const octokit = github.getOctokit(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);
octokit.projects.createCard({
column_id: backlogProjectId,
content_id: issueNumber,
content_type: "Issue"
});