Skip to content

Commit 65e21ed

Browse files
committedOct 26, 2021
added github workflows
1 parent 9cc0c59 commit 65e21ed

File tree

4 files changed

+270
-2
lines changed

4 files changed

+270
-2
lines changed
 

‎.github/ISSUE_TEMPLATE/bug.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ If applicable
2929
# Traceback
3030

3131
```
32-
Paste here logs here...
32+
Paste any logs here...
3333
```
3434

3535
# RISC OS Release
@@ -39,7 +39,7 @@ Type the full RISC OS release of the system where you had the issue, for example
3939
# Loaded Modules
4040

4141
```
42-
Paste here the list of loaded modules. The get the list open a TaskWindow and type: help modules, then copy and paste here the output.
42+
Paste here the list of loaded modules. To get the list open a TaskWindow and type: help modules, then copy and paste here the output.
4343
```
4444

4545
# Platform
@@ -52,6 +52,7 @@ Paste here the list of loaded modules. The get the list open a TaskWindow and ty
5252
[] - Acorn RiscPC StrongARM
5353
[] - Acorn RiscPC with Kinetic or Castle RiscPC
5454
[] - Acorn A7000/A7000+ or Castle A7000+
55+
[] - Raspberry Pi0 (all models)
5556
[] - Raspberry Pi1 (model A or B)
5657
[] - Raspberry Pi2 (all models)
5758
[] - Raspberry Pi3 (all models)

‎.github/ISSUE_TEMPLATE/bug.yaml

+116
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
name: Bug Report
2+
description: File a bug report
3+
title: "[Bug]: "
4+
labels: [bug, triage]
5+
assignees:
6+
- dev-team
7+
body:
8+
- type: markdown
9+
attributes:
10+
value: |
11+
Thanks for taking the time to fill out this bug report!
12+
- type: input
13+
id: contact
14+
attributes:
15+
label: Contact Details (optional)
16+
description: How can we get in touch with you if we need more info?
17+
placeholder: ex. email@example.com
18+
validations:
19+
required: false
20+
- type: input
21+
id: prevalence
22+
attributes:
23+
label: Bug prevalence (optional)
24+
description: "How often do you or others encounter this bug?"
25+
placeholder: "Whenever I visit the user account page (1-2 times a week)"
26+
validations:
27+
required: false
28+
- type: textarea
29+
id: what-happened
30+
attributes:
31+
label: What happened?
32+
description: Also tell us, what did you expect to happen?
33+
placeholder: Tell us what you see!
34+
value: "A bug happened!"
35+
validations:
36+
required: true
37+
- type: textarea
38+
id: repro
39+
attributes:
40+
label: Reproduction steps
41+
description: "How do you trigger this bug? Please walk us through it step by step."
42+
value: |
43+
1.
44+
2.
45+
3.
46+
...
47+
render: bash
48+
validations:
49+
required: true
50+
- type: input
51+
id: version
52+
attributes:
53+
label: Version
54+
description: Which release are you using?
55+
placeholder: v1.0.0
56+
value: "v1.0.0"
57+
validations:
58+
required: true
59+
- type: dropdown
60+
id: platform
61+
attributes:
62+
label: Platform
63+
description: Which platform are you running RISC OS on?
64+
options:
65+
- Acorn A3000 (with ARM 3)
66+
- Acorn A30x0 or A4000 series (with ARM250)
67+
- Acorn A5000
68+
- Acorn A7000/A7000+ or Castle A7000+
69+
- Acorn Archimedes 3x0/4x0 series (with ARM 3)
70+
- Acorn Archimedes 5x0 series
71+
- Acorn RiscPC 600 (with ARM 610)
72+
- Acorn RiscPC 700 (with ARM 710)
73+
- Acorn RiscPC x00 with StrongARM
74+
- Acorn RiscPC x00 with Kinetic or Castle RiscPC
75+
- BeagleBoard
76+
- BeagleBoard xM
77+
- CJE RapidO Ig
78+
- CJE RapidO Ti
79+
- Elesar Titanium
80+
- PandaBoard
81+
- PandaBoard ES
82+
- Raspberry Pi 0 all models
83+
- Raspberry Pi 1 model A or B
84+
- Raspberry Pi 2 all models
85+
- Raspberry Pi 3B+
86+
- Raspberry Pi 4 (Default)
87+
- Raspberry Pi 400 (edge)
88+
- RComp ARMBook or PineBook
89+
- RComp ARMiniX
90+
- RComp ARMX6
91+
- RComp Forte
92+
- RComp Mini.m
93+
validations:
94+
required: true
95+
- type: input
96+
id: riscosversion
97+
attributes:
98+
label: Which version of RISC OS are you using?
99+
placeholder: v1.0.0
100+
value: "v1.0.0"
101+
validations:
102+
required: true
103+
- type: textarea
104+
id: logs
105+
attributes:
106+
label: Can you copy and paste the list of loaded modules?
107+
description: To obtain a list of loaded modules simply open a TaskWindow and type `*modules` and then `*rom.` and copy and paste here all the output
108+
render: shell
109+
- type: checkboxes
110+
id: terms
111+
attributes:
112+
label: Code of Conduct
113+
description: By submitting this issue, you agree to follow our [Code of Conduct](./CODE_OF_CONDUCT.md)
114+
options:
115+
- label: I agree to follow this project's Code of Conduct
116+
required: true
+125
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
---
2+
#
3+
# - Run this workflow to pull changes from the template repository.
4+
#
5+
# - Clone this repository. Check out a branch
6+
# - Copy files from the template onto this clone
7+
# - Push the branch to this repository
8+
# - Create a pull request in this repository
9+
#
10+
name: Sync changes from template
11+
12+
# TODO:
13+
# - Switch to gh. Check https://github.com/cli/cli/issues/297 for updates
14+
15+
on:
16+
# Run at 0517 UTC each Friday
17+
schedule:
18+
- cron: "17 5 * * 5"
19+
20+
# Run when this file changes
21+
push:
22+
paths:
23+
- .github/workflows/sync-from-template.yaml
24+
25+
# Run when manually triggered
26+
workflow_dispatch:
27+
28+
env:
29+
MAIN_BRANCH: main
30+
BASE_BRANCH: develop
31+
HEAD_BRANCH: chore/sync-from-template
32+
GIT_AUTHOR_NAME: ${{ github.repository_owner }}
33+
GIT_AUTHOR_EMAIL: ${{ github.repository_owner }}@users.noreply.github.com
34+
REPO_TEMPLATE: RISC-OS-Community/StandardRepoTemplate
35+
THIS_REPO: ${{ github.repository }}
36+
37+
jobs:
38+
sync-from-template:
39+
# Do not run on the template repository itself
40+
if: github.repository != 'RISC-OS-Community/StandardRepoTemplate'
41+
name: Sync changes from RISC-OS-Community/StandardRepoTemplate
42+
runs-on: ubuntu-latest
43+
continue-on-error: true
44+
45+
steps:
46+
# Clone the template repository
47+
- name: Check out template repository
48+
uses: actions/checkout@v2
49+
with:
50+
repository: ${{ env.REPO_TEMPLATE }}
51+
token: ${{ github.token }}
52+
path: ${{ env.REPO_TEMPLATE }}
53+
ref: main
54+
55+
# Configure git globals
56+
#- name: Configure git globals
57+
# run: |
58+
# git config --global init.defaultBranch ${MAIN_BRANCH}
59+
60+
# Clone the target repository. Check out a branch
61+
- name: Check out ${{ github.repository }}
62+
uses: actions/checkout@v2
63+
with:
64+
repository: ${{ github.repository }}
65+
token: ${{ github.token }}
66+
path: ${{ github.repository }}
67+
ref: main
68+
- name: Create branch in ${{ env.THIS_REPO }}
69+
run: |
70+
git -C "${THIS_REPO}" fetch origin "${HEAD_BRANCH}" || true
71+
git -C "${THIS_REPO}" branch -a
72+
git -C "${THIS_REPO}" checkout -B "${HEAD_BRANCH}" \
73+
"remotes/origin/${HEAD_BRANCH}" || \
74+
git -C "${THIS_REPO}" checkout -b "${HEAD_BRANCH}"
75+
76+
# Copy files from the template onto the target clone
77+
- name: Copy template contents
78+
run: |
79+
_files="$(find ${REPO_TEMPLATE} \
80+
! -path "*/.git/*" \
81+
! -path "*/.github/workflows/*" \
82+
! -name ".gitignore" \
83+
! -name "README.md" \
84+
-type f \
85+
-print)"
86+
for _file in ${_files}; do
87+
_src="${_file}"
88+
_dst="${THIS_REPO}/${_file#${REPO_TEMPLATE}/}"
89+
# TODO: Find a more robust / elegant way to get this :point_down:
90+
_dst="${_dst%/*}/"
91+
mkdir -p "${_dst}"
92+
echo "INFO: Copy '${_src}' to '${_dst}'."
93+
cp "${_src}" "${_dst}"
94+
done
95+
git -C "${THIS_REPO}" diff
96+
97+
# Commit changes, if there are any
98+
- name: Commit changes, if any
99+
run: |
100+
git -C ${THIS_REPO} config user.name "${GIT_AUTHOR_NAME}"
101+
git -C ${THIS_REPO} config \
102+
user.email "${GIT_AUTHOR_EMAIL}"
103+
git -C ${THIS_REPO} add .
104+
git -C ${THIS_REPO} commit \
105+
-m "Sync from template@${{ github.sha }}"
106+
107+
# Push the branch to the target repository
108+
- name: Push topic branch
109+
run: git -C ${THIS_REPO} push -u origin "${HEAD_BRANCH}"
110+
111+
# Create a pull request in the target repository
112+
- name: Create pull request
113+
env:
114+
GITHUB_TOKEN: ${{ github.token }}
115+
GITHUB_USER: ${{ github.actor }}
116+
run: |
117+
pushd ${THIS_REPO}
118+
hub pull-request \
119+
-b "${BASE_BRANCH}" \
120+
-h "${HEAD_BRANCH}" \
121+
--no-edit \
122+
-m "Pull updates from ${REPO_TEMPLATE}" \
123+
-m "Pull updates from ${REPO_TEMPLATE}"
124+
popd
125+
+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
name: Notify twitter of new Pull Request
3+
4+
on:
5+
# Run on Pull requests:
6+
pull_request:
7+
branches: [ main ]
8+
9+
# Run when manually triggered
10+
workflow_dispatch:
11+
12+
env:
13+
THIS_REPO: ${{ github.repository }}
14+
15+
jobs:
16+
tweet:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: ethomson/send-tweet-action@v1
20+
with:
21+
status: "🎉 New Pull Request in ${{ env.THIS_REPO }}! You can check it out here: https://github.com/${{ env.THIS_REPO }} #RISC_OS #RISCOS #ROCOnGitHub #OpenSource #DevCommunity"
22+
consumer-key: ${{ secrets.TWITTER_CONSUMER_API_KEY }}
23+
consumer-secret: ${{ secrets.TWITTER_CONSUMER_API_SECRET }}
24+
access-token: ${{ secrets.TWITTER_ACCESS_TOKEN }}
25+
access-token-secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
26+

0 commit comments

Comments
 (0)
Please sign in to comment.