Skip to content
This repository has been archived by the owner on Aug 9, 2024. It is now read-only.

Commit

Permalink
Merge pull request #37 from LizardByte/nightly
Browse files Browse the repository at this point in the history
v0.0.5
  • Loading branch information
ReenigneArcher committed May 6, 2023
2 parents 3e8e28b + 07619c2 commit f817681
Show file tree
Hide file tree
Showing 33 changed files with 944 additions and 154 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@

# ignore directories
docs/
tests/
venv/
24 changes: 20 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,46 @@ updates:
directory: "/"
schedule:
interval: "daily"
time: "00:00"
time: "08:00"
target-branch: "nightly"
open-pull-requests-limit: 10

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
time: "00:00"
time: "08:30"
target-branch: "nightly"
open-pull-requests-limit: 10

- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
time: "00:00"
time: "09:00"
target-branch: "nightly"
open-pull-requests-limit: 10

- package-ecosystem: "nuget"
directory: "/"
schedule:
interval: "daily"
time: "09:30"
target-branch: "nightly"
open-pull-requests-limit: 10

- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
time: "00:00"
time: "10:00"
target-branch: "nightly"
open-pull-requests-limit: 10

- package-ecosystem: "gitsubmodule"
directory: "/"
schedule:
interval: "daily"
time: "10:30"
target-branch: "nightly"
open-pull-requests-limit: 10
6 changes: 5 additions & 1 deletion .github/pr_release_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@ This PR was created automatically.
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Dependency update (updates to dependencies)
- [ ] Documentation update (changes to documentation)
- [ ] Repository update (changes to repository files)
- [ ] Repository update (changes to repository files, e.g. `.github/...`)

## Branch Updates
- [x] I want maintainers to keep my branch updated

## Changelog Summary
<!--- Summarize all the changes in a bulleted list. --->
6 changes: 3 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
id: verify_changelog
if: ${{ github.ref == 'refs/heads/master' || github.base_ref == 'master' }}
# base_ref for pull request check, ref for push
uses: LizardByte/actions/verify_changelog@master
uses: LizardByte/.github/actions/verify_changelog@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
outputs:
Expand Down Expand Up @@ -54,8 +54,8 @@ jobs:
# install dev requirements
python -m pip install --upgrade -r requirements-dev.txt
# install plugin requirements
python ./scripts/install_requirements.py
python -m pip install --upgrade --target=./Contents/Libraries/Shared -r \
requirements.txt --no-warn-script-location
- name: Build plist
working-directory: PlexyGlass.bundle
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/auto-create-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in
# the above-mentioned repo.

# This workflow creates a PR automatically when anything is merged/pushed into the `nightly` branch. The PR is created
# against the `master` (default) branch.

name: Auto create PR

on:
Expand All @@ -12,6 +15,7 @@ on:

jobs:
create_pr:
if: startsWith(github.repository, 'LizardByte/')
runs-on: ubuntu-latest

steps:
Expand Down
21 changes: 13 additions & 8 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in
# the above-mentioned repo.

# This workflow will, first, automatically approve PRs created by @LizardByte-bot. Then it will automerge relevant PRs.

name: Automerge PR

on:
Expand All @@ -11,15 +13,20 @@ on:
- opened
- synchronize

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
autoapprove:
if: >
if: >-
contains(fromJson('["LizardByte-bot"]'), github.event.pull_request.user.login) &&
contains(fromJson('["LizardByte-bot"]'), github.actor)
contains(fromJson('["LizardByte-bot"]'), github.actor) &&
startsWith(github.repository, 'LizardByte/')
runs-on: ubuntu-latest
steps:
- name: Autoapproving
uses: hmarr/auto-approve-action@v2
uses: hmarr/auto-approve-action@v3
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

Expand All @@ -36,20 +43,18 @@ jobs:
})
automerge:
if: startsWith(github.repository, 'LizardByte/')
needs: [autoapprove]
runs-on: ubuntu-latest
concurrency:
group: automerge-${{ github.ref }}
cancel-in-progress: true

steps:
- name: Automerging
uses: pascalgn/automerge-action@v0.15.3
uses: pascalgn/automerge-action@v0.15.6
env:
BASE_BRANCHES: nightly
GITHUB_TOKEN: ${{ secrets.GH_BOT_TOKEN }}
GITHUB_LOGIN: ${{ secrets.GH_BOT_NAME }}
MERGE_LABELS: ""
MERGE_LABELS: "!dependencies"
MERGE_METHOD: "squash"
MERGE_COMMIT_MESSAGE: "{pullRequest.title} (#{pullRequest.number})"
MERGE_DELETE_BRANCH: true
Expand Down
72 changes: 72 additions & 0 deletions .github/workflows/autoupdate-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
# This action is centrally managed in https://github.com/<organization>/.github/
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in
# the above-mentioned repo.

# Label PRs with `autoupdate` if various conditions are met, otherwise, remove the label.

name: Label PR autoupdate

on:
pull_request_target:
types:
- edited
- opened
- reopened
- synchronize

jobs:
label_pr:
if: >-
startsWith(github.repository, 'LizardByte/') &&
contains(github.event.pull_request.body, fromJSON('"] I want maintainers to keep my branch updated"'))
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ github.token }}
steps:
- name: Check if member
id: org_member
run: |
status="true"
gh api \
-H "Accept: application/vnd.github+json" \
/orgs/${{ github.repository_owner }}/members/${{ github.actor }} || status="false"
echo "result=${status}" >> $GITHUB_OUTPUT
- name: Label autoupdate
if: >-
steps.org_member.outputs.result == 'true' &&
contains(github.event.pull_request.labels.*.name, 'autoupdate') == false &&
contains(github.event.pull_request.body,
fromJSON('"\n- [x] I want maintainers to keep my branch updated"')) == true
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GH_BOT_TOKEN }}
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['autoupdate']
})
- name: Unlabel autoupdate
if: >-
contains(github.event.pull_request.labels.*.name, 'autoupdate') &&
(
(github.event.action == 'synchronize' && steps.org_member.outputs.result == 'false') ||
(contains(github.event.pull_request.body,
fromJSON('"\n- [x] I want maintainers to keep my branch updated"')) == false
)
)
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GH_BOT_TOKEN }}
script: |
github.rest.issues.removeLabel({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
name: ['autoupdate']
})
31 changes: 25 additions & 6 deletions .github/workflows/autoupdate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in
# the above-mentioned repo.

# This workflow is designed to work with:
# - automerge workflows
# This workflow is designed to work with the following workflows:
# - automerge
# - autoupdate-labeler

# It uses GitHub Action that auto-updates pull requests branches, when changes are pushed to their destination branch.
# It uses an action that auto-updates pull requests branches, when changes are pushed to their destination branch.
# Auto-updating to the latest destination branch works only in the context of upstream repo and not forks.
# Dependabot PRs are updated by an action that comments `@depdenabot rebase` on dependabot PRs. (disabled)

name: autoupdate

Expand All @@ -17,16 +19,33 @@ on:
- 'nightly'

jobs:
autoupdate-for-bot:
autoupdate:
name: Autoupdate autoapproved PR created in the upstream
if: startsWith(github.repository, 'LizardByte/')
runs-on: ubuntu-latest
steps:
- name: Update
uses: docker://chinthakagodawita/autoupdate-action:v1
env:
EXCLUDED_LABELS: "central_dependency,dependencies"
GITHUB_TOKEN: '${{ secrets.GH_BOT_TOKEN }}'
PR_FILTER: "labelled"
PR_LABELS: "autoupdate"
PR_READY_STATE: "ready_for_review"
MERGE_CONFLICT_ACTION: "ignore"
PR_READY_STATE: "all"
MERGE_CONFLICT_ACTION: "fail"

# Disabled due to:
# - no major version tag, resulting in constant nagging to update this action
# - additionally, the code is sketchy, 16k+ lines of code?
# https://github.com/bbeesley/gha-auto-dependabot-rebase/blob/main/dist/main.cjs
#
# dependabot-rebase:
# name: Dependabot Rebase
# if: >-
# startsWith(github.repository, 'LizardByte/')
# runs-on: ubuntu-latest
# steps:
# - name: rebase
# uses: "bbeesley/gha-auto-dependabot-rebase@v1.3.18"
# env:
# GITHUB_TOKEN: ${{ secrets.GH_BOT_TOKEN }}
Loading

0 comments on commit f817681

Please sign in to comment.