This repository has been archived by the owner on Aug 9, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from LizardByte/nightly
v0.0.5
- Loading branch information
Showing
33 changed files
with
944 additions
and
154 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 |
---|---|---|
|
@@ -6,3 +6,5 @@ | |
|
||
# ignore directories | ||
docs/ | ||
tests/ | ||
venv/ |
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
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
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
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
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
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,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'] | ||
}) |
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
Oops, something went wrong.