Fix: refactor the code, removing css errors and unused assets #12
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: Add new issues to GitHub projects beta with milestone | |
on: | |
issues: | |
types: [opened, reopened] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Checks-out repository under $GITHUB_WORKSPACE, so jobs can access it | |
- uses: actions/checkout@v3 | |
# Automatically add issues to GitHub projects beta | |
- name: Add To GitHub Projects Beta | |
uses: actions/add-to-project@v0.0.3 | |
with: | |
# URL of the project to add issues to | |
project-url: https://github.com/orgs/feature-sh/projects/1 | |
github-token: ${{ secrets.GHPROJECT_TOKEN }} | |
- name: Add lastest milestone | |
# Edit issue data with GitHub's REST API | |
run: | | |
milestonesURL="${{ github.event.issue.repository_url }}/milestones" \ | |
&& \ | |
lastMilestoneNumber=$(curl \ | |
-H "Accept: application/vnd.github.v3+json" \ | |
-u ${{ github.event.issue.user.login }}:${{ secrets.GHPROJECT_TOKEN }} \ | |
${milestonesURL} \ | |
| grep '"number": [0-9]' | tail -1 | grep -o "[*0-9]") \ | |
&& \ | |
curl --request PATCH \ | |
--url ${{ github.event.issue.url }} \ | |
--header 'authorization: token ${{ secrets.GHPROJECT_TOKEN }}' \ | |
--data "{\"milestone\": ${lastMilestoneNumber}}" |