Skip to content

Commit

Permalink
add github code management automations
Browse files Browse the repository at this point in the history
  • Loading branch information
lpm0073 committed Oct 8, 2023
1 parent 7fda988 commit 69c1004
Show file tree
Hide file tree
Showing 13 changed files with 378 additions and 19 deletions.
3 changes: 3 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Contributing

The repository is released under the GNU AFFERO GENERAL PUBLIC LICENSE license, and follows a standard Github development process, using Github tracker for issues and merging pull requests into master.
4 changes: 4 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# These are supported funding model platforms

github: lpm0073
patreon: lpm0073
18 changes: 18 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Pull Request Template

## Type of Change
<!-- What type of change does your code introduce? -->
- [ ] New feature
- [ ] Bug fix
- [ ] Documentation
- [ ] Refactor
- [ ] Chore

## Resolves

- Fixes #[Add issue number here.]

## Describe Changes

<!-- Describe your changes in detail, if applicable. -->
_Describe what this Pull Request does_
11 changes: 7 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
version: 2
updates:
- package-ecosystem: docker
- package-ecosystem: terraform
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
- package-ecosystem: terraform
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: daily
open-pull-requests-limit: 10
interval: "weekly"
- package-ecosystem: "pip"
directory: "/api/terraform/python/"
schedule:
interval: "weekly"
80 changes: 80 additions & 0 deletions .github/workflows/ISSUE_TEMPLATE/BUG-REPORT.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: "🐛 Bug Report"
description: Create a new ticket for a bug.
title: "🐛 [BUG] - <title>"
labels: [
"bug"
]
body:
- type: textarea
id: description
attributes:
label: "Description"
description: Please enter an explicit description of your issue
placeholder: Short and explicit description of your incident...
validations:
required: true
- type: input
id: reprod-url
attributes:
label: "Reproduction URL"
description: Please enter your GitHub URL to provide a reproduction of the issue
placeholder: ex. https://github.com/USERNAME/REPO-NAME
validations:
required: true
- type: textarea
id: reprod
attributes:
label: "Reproduction steps"
description: Please enter an explicit description of your issue
value: |
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
render: bash
validations:
required: true
- type: textarea
id: screenshot
attributes:
label: "Screenshots"
description: If applicable, add screenshots to help explain your problem.
value: |
![DESCRIPTION](LINK.png)
render: bash
validations:
required: false
- type: textarea
id: logs
attributes:
label: "Logs"
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
render: bash
validations:
required: false
- type: dropdown
id: browsers
attributes:
label: "Browsers"
description: What browsers are you seeing the problem on ?
multiple: true
options:
- Firefox
- Chrome
- Safari
- Microsoft Edge
- Opera
validations:
required: false
- type: dropdown
id: os
attributes:
label: "OS"
description: What is the impacted environment ?
multiple: true
options:
- Windows
- Linux
- Mac
validations:
required: false
63 changes: 63 additions & 0 deletions .github/workflows/ISSUE_TEMPLATE/FEATURE-REQUEST.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: "💡 Feature Request"
description: Create a new ticket for a new feature request
title: "💡 [REQUEST] - <title>"
labels: [
"question"
]
body:
- type: input
id: start_date
attributes:
label: "Start Date"
description: Start of development
placeholder: "month/day/year"
validations:
required: false
- type: textarea
id: implementation_pr
attributes:
label: "Implementation PR"
description: Pull request used
placeholder: "#Pull Request ID"
validations:
required: false
- type: textarea
id: reference_issues
attributes:
label: "Reference Issues"
description: Common issues
placeholder: "#Issues IDs"
validations:
required: false
- type: textarea
id: summary
attributes:
label: "Summary"
description: Provide a brief explanation of the feature
placeholder: Describe in a few lines your feature request
validations:
required: true
- type: textarea
id: basic_example
attributes:
label: "Basic Example"
description: Indicate here some basic examples of your feature.
placeholder: A few specific words about your feature request.
validations:
required: true
- type: textarea
id: drawbacks
attributes:
label: "Drawbacks"
description: What are the drawbacks/impacts of your feature request ?
placeholder: Identify the drawbacks and impacts while being neutral on your feature request
validations:
required: true
- type: textarea
id: unresolved_question
attributes:
label: "Unresolved questions"
description: What questions still remain unresolved ?
placeholder: Identify any unresolved issues.
validations:
required: false
1 change: 1 addition & 0 deletions .github/workflows/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
25 changes: 25 additions & 0 deletions .github/workflows/checkPullRequest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Check Pull Request

on:
pull_request:
branches:
- main

jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]

- name: Semantic Release
uses: cycjimmy/semantic-release-action@v3
with:
branch: main
extra_plugins: |
@semantic-release/git
@semantic-release/changelog
dry_run: true
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
15 changes: 0 additions & 15 deletions .github/workflows/dependabot-terraform.yml

This file was deleted.

51 changes: 51 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#---------------------------------------------------------
# - Create a semantical release
# - Set latest tag
#---------------------------------------------------------
name: Create a new release

on: workflow_dispatch

jobs:
build:
runs-on: ubuntu-latest

steps:
# required antecedent
- uses: actions/[email protected]

- name: Semantic Release
uses: cycjimmy/semantic-release-action@v3
id: semantic
with:
branches: |
[
'+([0-9])?(.{+([0-9]),x}).x',
'main',
'next',
'next-major',
{
name: 'beta',
prerelease: true
},
{
name: 'alpha',
prerelease: true
}
]
extra_plugins: |
@semantic-release/git
@semantic-release/changelog
env:
GITHUB_TOKEN: ${{ secrets.PAT }}

- name: Publish To GitHub Package Registry
if: steps.semantic.outputs.new_release_published == 'true'
run: echo "new release was published"
shell: bash

- name: Push updates to branch for major version
if: steps.semantic.outputs.new_release_published == 'true'
run: "git push https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:refs/heads/v${{steps.semantic.outputs.new_release_major_version}}"
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
31 changes: 31 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#---------------------------------------------------------
# - Setup AWS CLI environment using the secrets from this repo.
# - Try to build and upload the image.
#---------------------------------------------------------
name: Test this action

on: workflow_dispatch

jobs:
test:
runs-on: ubuntu-latest

steps:
# required antecedent
- uses: actions/[email protected]

# required antecedent
- name: Configure AWS credentials
uses: aws-actions/[email protected]
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}

# This action
- name: Use the action in this repo to add a theme to an openedx build
uses: ./
with:
repository: 'edx.custom-theme'
repository-ref: 'master'
repository-organization: lpm0073
Loading

0 comments on commit 69c1004

Please sign in to comment.