Skip to content

Commit

Permalink
Fix Workflow Actions
Browse files Browse the repository at this point in the history
<html>
<body>
<!--StartFragment--><h2 dir="auto" style="box-sizing: border-box; margin-top: 24px; margin-bottom: 16px; font-size: 1.5em; font-weight: var(--base-text-weight-semibold, 600); line-height: 1.25; padding-bottom: 0.3em; border-bottom: 1px solid var(--color-border-muted); color: rgb(230, 237, 243); font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;Noto Sans&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(13, 17, 23); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">Improve Workflow Actions</h2><p dir="auto" style="box-sizing: border-box; margin-top: 0px; margin-bottom: 16px; color: rgb(230, 237, 243); font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;Noto Sans&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;; font-size: 14px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(13, 17, 23); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">The changes consist of adding and updating GitHub Actions workflows to improve the codebase's quality, security, and maintainability. The changes include adding a workflow to greet new contributors, running a linter on the codebase, using the correct GitHub token in two jobs, running OpenCommit on push events, and releasing to Discord when a new release is published. Additionally, a workflow file that triggered a PR description generator was removed.</p><h2 dir="auto" style="box-sizing: border-box; margin-top: 24px; margin-bottom: 16px; font-size: 1.5em; font-weight: var(--base-text-weight-semibold, 600); line-height: 1.25; padding-bottom: 0.3em; border-bottom: 1px solid var(--color-border-muted); color: rgb(230, 237, 243); font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;Noto Sans&quot;, Helvetica, Arial, sans-serif, &quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; white-space: normal; background-color: rgb(13, 17, 23); text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">Table of files and their summaries</h2>

File | Summary | Triage
-- | -- | --
.github/workflows/greet.yml | Adds a GitHub Actions workflow that greets new contributors when they open an issue or pull request. No changes to the logic or functionality of the codebase. | APPROVED
.github/workflows/linter.yml | Adds a GitHub Actions workflow to run the super-linter tool on the codebase. The workflow is triggered on push and pull request events, except for the master and main branches. The super-linter tool is used to lint the codebase. No changes to the logic or functionality of the codebase. | APPROVED
.github/workflows/ai-security-check-for-pr.yml | Updates the GitHub token used in two jobs to secrets.GITHUB_TOKEN instead of secrets.GH_TOKEN. This change is a minor modification that does not affect the code logic or functionality. | APPROVED
.github/workflows/opencommit.yml | Adds a GitHub action to run OpenCommit on push events for branches other than master. No changes to the codebase logic or functionality. | APPROVED
.github/workflows/release_discord.yml | Adds a GitHub Actions workflow to release to Discord when a new release is published. No changes to the logic or functionality of the codebase. | APPROVED
.github/workflows/openai-pr-description.yml | Removes a GitHub Actions workflow file that triggers a PR description generator. The author states that this is not a user-facing change and adds checks to ensure releases are clean. The changes do not appear to modify the logic or functionality of the codebase. | APPROVED

<br class="Apple-interchange-newline"><!--EndFragment-->
</body>
</html>
  • Loading branch information
rootiest authored Jun 8, 2023
2 parents a142849 + 361527c commit 5300524
Show file tree
Hide file tree
Showing 6 changed files with 116 additions and 24 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ai-security-check-for-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
id: ai_security_check
uses: obetomuniz/[email protected]
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPOSITORY: ${{ github.repository }}
GH_EVENT_PULL_REQUEST_NUMBER: ${{ github.event.number }}
OPENAI_TOKEN: ${{ secrets.OCO_OPENAI_API_KEY }}
Expand All @@ -35,7 +35,7 @@ jobs:
env:
PR_COMMENT: ${{ steps.ai_security_check.outputs.pr_comment }}
with:
github-token: ${{ secrets.GH_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const prComment = process.env.PR_COMMENT || "No security or privacy issues found.";
const { data } = await github.rest.issues.createComment({
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/greet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Greet New Contributors
on:
issues:
types: [opened]
pull_request:
types: [opened]
jobs:
greet:
runs-on: ubuntu-latest
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: '# Welcome ${{ github.actor }}!\nCongrats on creating your first issue.\nPlease follow the issue template to help us resolve your issue quickly.'
pr-message: '# Welcome ${{ github.actor }}!\nCongrats on creating your first pull request.\nPlease follow the pull request template to help us review your pull request quickly and effectively.'
59 changes: 59 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
#################################
#################################
## Super Linter GitHub Actions ##
#################################
#################################
name: Lint Code Base

#############################
# Start the job on all push #
#############################
on:
push:
branches-ignore: [master, main]
# Remove the line above to run when pushing to master
pull_request:
branches: [master, main]

###############
# Set the Job #
###############
jobs:
build:
# Name the Job
name: Lint Code Base
# Set the agent to run on
runs-on: ubuntu-latest

############################################
# Grant status permission for MULTI_STATUS #
############################################
permissions:
contents: read
packages: read
statuses: write

##################
# Load all steps #
##################
steps:
##########################
# Checkout the code base #
##########################
- name: Checkout Code
uses: actions/checkout@v3
with:
# Full git history is needed to get a proper
# list of changed files within `super-linter`
fetch-depth: 0

################################
# Run Linter against code base #
################################
- name: Lint Code Base
uses: github/super-linter@v5
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: master
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22 changes: 0 additions & 22 deletions .github/workflows/openai-pr-description.yml

This file was deleted.

38 changes: 38 additions & 0 deletions .github/workflows/opencommit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: 'OpenCommit Action'

on:
push:
# this list of branches is often enough,
# but you may still ignore other public branches
branches-ignore: [master]
jobs:
opencommit:
timeout-minutes: 10
name: OpenCommit
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Setup Node.js Environment
uses: actions/setup-node@v2
with:
node-version: '16'
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: di-sukharev/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

env:
# set openAI api key in repo actions secrets,
# for openAI keys go to: https://platform.openai.com/account/api-keys
# for repo secret go to: <your_repo_url>/settings/secrets/actions
OCO_OPENAI_API_KEY: ${{ secrets.OCO_OPENAI_API_KEY }}

# customization
OCO_OPENAI_MAX_TOKENS: 500
OCO_OPENAI_BASE_PATH: ''
OCO_DESCRIPTION: false
OCO_EMOJI: false
OCO_MODEL: gpt-3.5-turbo
OCO_LANGUAGE: en
2 changes: 2 additions & 0 deletions .github/workflows/release_discord.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: Release to Discord

on:
release:
types: [published]
Expand Down

0 comments on commit 5300524

Please sign in to comment.