GithubHelp home page GithubHelp logo

nfhipona / guestbook-workflow Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 262 KB

Allows you to use your repo issues as your guestbook entries and show it on your GitHub profile or project's README file.

Home Page: https://nfhipona.github.io/guestbook-workflow/

License: MIT License

JavaScript 100.00%
comments guestbook issues profile chat community workflow

guestbook-workflow's Introduction

Guestbook Workflow

Allows you to use your repo issues as your guestbook entries and show it on your github profile or project's README file.

Environment Flags

Environment Flag Default Value Required Description
gh_token ${{ github.token }} No GitHub access token with Repo scope.
max_display_count 10 No Maximum number of entries you want to show on your README file.
max_character_count 300 No Maximum character length to display in the guestbook.
retry_enabled true No Sets retry fetch flag enabled or disabled.
max_retry_count 3 No Maximum number of times to retry the fetch operation if it fails.
retry_wait_time 3 No Time to wait before each retry operation in seconds.
entry_labels guestbook_entry No Add label to guestbook entries for additional accuracy. Will support max of 5 labels. eg. guestbook_entry, guestbook_entry_2, guestbook_entry_n, ... If left empty, option filter is disregarded
entry_identifier GUEST_BOOK_ENTRY No Guestbook title prefix identifier.
entry_identifier_delimiter : No Guestbook title prefix identifier delimiter to separate entry title. eg. GUEST_BOOK_ENTRY: USER_CONTENT_TITLE.
comment_template * **[$username]($profile) *wrote on $date*:** $title: $content No Template format to display guests comments. variables: $username, $profile, $date, $title, $content.
comment_empty_title_template * **[$username]($profile) *wrote on $date*:** $content No Template format to display guests comments. variables: $username, $profile, $date, $content
comment_link_template Do you like my project or just want to say hi? Feel free to [post something](https://github.com/$username/$repo/issues/new?title=$identifier) to ***[my](https://github.com/$username)*** guestbook! No Template format to display link to guestbook.
empty_template Nothing to see here. Be the first to [post something](https://github.com/$username/$repo/issues/new?title=$identifier) to ***[my](https://github.com/$username)*** guestbook! No Template format to display when guestbook is empty. variables: $username, $repo, $identifier.
target_branch main No The target branch to work on. Defaults to main.
section_identifier guestbook No The section identifier in readme file.
include_body_formatting true No Flag to tell the parser to include original formatting on the comment body.
close_outdated_issues false No Close all outdated issues or comments past the max_display_count parameter.
remote_repo current No Use another repo to pull data from that lives in your account. Useful if you want to host and pull entries from different source repo.

Usage

Create a folder named .github/workflows in your root directory. Define your .yml config file under .github/workflows folder in your repository.

Add workflow section tag in your README file.

<!--START_SECTION:[section_identifier]-->
<!--END_SECTION:[section_identifier]-->

Sample .yml config.

name: Guestbook Workflow
on:
  schedule: # Run workflow automatically
    - cron: '0 0 31 12 *' # Runs at 00:00 on day-of-month 31 in December.
  workflow_dispatch: # Run workflow manually (without waiting for the cron to be called), through the GitHub Actions Workflow page directly
  issues:
    types: [opened, closed, reopened, deleted, edited]
permissions:
  contents: write # To write the generated contents to the readme

jobs:
  update_guestbook:
    name: Update this repo's README with guestbook's latest activity
    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v3

      - name: Update guestbook with the latest guest post entries
        uses: nfhipona/guestbook-workflow@main
        with:
          target_branch: 'main'
          section_identifier: 'guestbook-section'
          include_body_formatting: true # this already defaults to true -- just for demo
          close_outdated_issues: true
          entry_labels: 'guestbook_entry'

IMPORTANT

Make sure to define or and create label with guestbook_entry in respect to entry_labels flag and attach it to the created issues or entries!

Guestbook

  • nfhipona wrote on 8/24/2023: v2.0.2 Entry: Testing with label flag
  • nfhipona wrote on 8/24/2023: v2.0.0 Features: Added new feature set and flags!
  • nfhipona wrote on 8/24/2023: Entry with Label: Use label instead of querying from title.

Do you like my project or just want to say hi? Feel free to post something to my guestbook!

About

This this project guestbook workflow was inspired by readme-guestbook! This work very similarly with some adjustments. I had some issues integrating readme-guestbook on my repo and I can't manage to fix so I decided to create my own with this as a basis. Don't forget to checkout readme-guestbook!

guestbook-workflow's People

Contributors

github-actions[bot] avatar nfhipona avatar

Stargazers

 avatar  avatar

Watchers

 avatar

guestbook-workflow's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.