StreetCommunityProgrammer / metaphore

Story as Code. Public Collections of Metaphore our Freestyler accross the world. Gain knowledge with unusual perspective from our Punk members.
https://metaphore.vercel.app
GNU General Public License v3.0
26 stars 5 forks source link

Punk Idea: Create a GitHub workflow to generate .md when we add a label to metaphore issue #6

Closed mkubdev closed 1 year ago

mkubdev commented 1 year ago

Is your mind blowing punk idea is something that wrong different then other.

@mkubdev

Tell me what you want to suggest

The action should look like this:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      # Check out the repository
      - uses: actions/checkout@v2
      # Install dependencies
      - name: Install dependencies
        run: |
          npm install @octokit/rest
      # Set up the GitHub API client
      - name: Set up the GitHub API client
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          const Octokit = require('@octokit/rest')
          const octokit = new Octokit({ auth: process.env.GITHUB_TOKEN })
      # Fetch the content of the issue
      - name: Fetch the content of the issue
        run: |
          const issueNumber = github.context.issue.number
          const { data: issue } = await octokit.issues.get({ owner: github.context.repo.owner, repo: github.context.repo.repo, issue_number: issueNumber })
          const content = issue.body
      # Generate the Markdown file
      - name: Generate the Markdown file
        run: |
          const fs = require('fs')
          fs.writeFileSync(`issue-${issueNumber}.md`, content)

Missing stuff is trigger this action when we put a specific label to accepted issue.

github-actions[bot] commented 1 year ago

Hello Punk! It's great having you contribute to this project

Welcome to the community :neckbeard:

If you would like to continue contributing to open source and would like to do it with an awesome inclusive community, you should join our GitHub Organisation - we help and encourage each other to contribute to open source little and often :neckbeard:. Any questions let us know.

darkterminal commented 1 year ago

Am trying to debug this action

github-actions[bot] commented 1 year ago

:tada: This issue has been resolved in version 1.0.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: