forked from hackforla/website
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'hackforla:gh-pages' into gh-pages
- Loading branch information
Showing
42 changed files
with
3,124 additions
and
2,114 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Schedule Monthly PREVIOUS | ||
|
||
on: | ||
schedule: | ||
- cron: "0 8 1 * *" | ||
|
||
jobs: | ||
list-inactive-members: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
# gets a list of website-write team members with no open issues, returns a list of member's github handles | ||
- name: Get List | ||
uses: actions/github-script@v6 | ||
id: get-list | ||
with: | ||
github-token: ${{ secrets.HACKFORLA_BOT_PA_TOKEN }} | ||
script: | | ||
const script = require('./github-actions/trigger-schedule/list-inactive-members/get-list.js'); | ||
const getList = script({g: github, c: context}); | ||
return getList; | ||
# creates a new issue in hackforla/website repo with the list populated above. creates a project card linking to this issue | ||
- name: Create New Issue | ||
uses: actions/github-script@v6 | ||
id: create-new-issue | ||
with: | ||
github-token: ${{ secrets.HACKFORLA_BOT_PA_TOKEN }} | ||
script: | | ||
const script = require('./github-actions/trigger-schedule/list-inactive-members/create-new-issue.js'); | ||
const list = ${{ steps.get-list.outputs.result }}; | ||
const createNewIssue = script({g: github, c: context}, list); | ||
return createNewIssue; | ||
# comments on issue #2607, notifying leads that the above issue has been created | ||
- name: Comment Issue | ||
uses: actions/github-script@v6 | ||
id: comment-issue | ||
with: | ||
github-token: ${{ secrets.HACKFORLA_BOT_PA_TOKEN }} | ||
script: | | ||
const script = require('./github-actions/trigger-schedule/list-inactive-members/comment-issue.js'); | ||
const newIssueNumber = ${{ steps.create-new-issue.outputs.result }}; | ||
script({g: github, c: context}, newIssueNumber); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,36 @@ | ||
name: Schedule Monthly | ||
|
||
# This action runs at 11:00 UTC/ 3:00 PDT on the first day of the month. | ||
on: | ||
schedule: | ||
- cron: "0 8 1 * *" | ||
- cron: 0 11 1 * * | ||
|
||
jobs: | ||
list-inactive-members: | ||
trim_contributors: | ||
runs-on: ubuntu-latest | ||
if: github.repository == 'hackforla/website' | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
# Checkout repo | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# gets a list of website-write team members with no open issues, returns a list of member's github handles | ||
- name: Get List | ||
uses: actions/github-script@v6 | ||
id: get-list | ||
with: | ||
github-token: ${{ secrets.HACKFORLA_BOT_PA_TOKEN }} | ||
script: | | ||
const script = require('./github-actions/trigger-schedule/list-inactive-members/get-list.js'); | ||
const getList = script({g: github, c: context}); | ||
return getList; | ||
# Setup node | ||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: 'npm' | ||
|
||
# creates a new issue in hackforla/website repo with the list populated above. creates a project card linking to this issue | ||
- name: Create New Issue | ||
uses: actions/github-script@v6 | ||
id: create-new-issue | ||
with: | ||
github-token: ${{ secrets.HACKFORLA_BOT_PA_TOKEN }} | ||
script: | | ||
const script = require('./github-actions/trigger-schedule/list-inactive-members/create-new-issue.js'); | ||
const list = ${{ steps.get-list.outputs.result }}; | ||
const createNewIssue = script({g: github, c: context}, list); | ||
return createNewIssue; | ||
# Install dependencies to run js file | ||
- name: Install npm dependencies | ||
run: npm install | ||
working-directory: ./github-actions/trigger-schedule/github-data | ||
|
||
# comments on issue #2607, notifying leads that the above issue has been created | ||
- name: Comment Issue | ||
uses: actions/github-script@v6 | ||
id: comment-issue | ||
with: | ||
github-token: ${{ secrets.HACKFORLA_BOT_PA_TOKEN }} | ||
script: | | ||
const script = require('./github-actions/trigger-schedule/list-inactive-members/comment-issue.js'); | ||
const newIssueNumber = ${{ steps.create-new-issue.outputs.result }}; | ||
script({g: github, c: context}, newIssueNumber); | ||
# Run js file- check action logs for inactive members and removes from 'website-write' | ||
- name: Trim Members | ||
env: | ||
token: ${{ secrets.HACKFORLA_BOT_PA_TOKEN }} | ||
run: node github-actions/trigger-schedule/github-data/contributors-data.js |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.