Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Community Announcements #603

Merged
merged 30 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
6b56e41
feat: Community Announcements Page (#567)
Megha-Dev-19 Dec 26, 2023
7ff903b
replacements for testnet
elliotBraem Dec 26, 2023
6857ebf
allow no communities found
elliotBraem Dec 27, 2023
3d86230
attach 2N when creating a community
elliotBraem Dec 27, 2023
f70467f
Merge branch 'main' into develop
elliotBraem Dec 28, 2023
aa7091e
configures with updated function call
elliotBraem Dec 28, 2023
8a0ca66
updated announcements UI (#606)
Megha-Dev-19 Dec 29, 2023
16a0a0c
Merge branch 'main' into develop
elliotBraem Dec 29, 2023
7579358
Merge branch 'main' into develop
elliotBraem Jan 1, 2024
d9be9ed
Merge branch 'main' into develop
elliotBraem Jan 3, 2024
f1e04c3
updates feed
elliotBraem Jan 4, 2024
81663fe
working feed
elliotBraem Jan 5, 2024
cd99e2a
show preview
elliotBraem Jan 5, 2024
170ea4f
Merge branch 'main' into develop
elliotBraem Jan 5, 2024
783b871
fix testnet
elliotBraem Jan 5, 2024
d81cfc5
Revert "initial typescript support (#468)"
elliotBraem Jan 9, 2024
da86a64
Move community Github and Board widgets from devgogigs to devhub (#561)
Megha-Dev-19 Jan 5, 2024
f8c08b8
Kanban board UI enhancement (#620)
Megha-Dev-19 Jan 6, 2024
c387fee
update to devhub.near
elliotBraem Jan 11, 2024
fc8c50e
fix posts for devgovgigs.near
elliotBraem Jan 11, 2024
1bffa62
Merge branch 'main' into develop
elliotBraem Jan 11, 2024
f375846
Points tests to devhub.near rather than devgovgigs.near (#595)
elliotBraem Jan 11, 2024
f0577b9
fix feeds
elliotBraem Jan 16, 2024
c2ed67e
Announcements tests (#639)
Megha-Dev-19 Jan 17, 2024
7ef1bd2
Merge branch 'main' of https://github.com/NEAR-DevHub/neardevhub-bos …
elliotBraem Jan 17, 2024
4616296
tests
elliotBraem Jan 17, 2024
19c57ec
format
elliotBraem Jan 17, 2024
1aad90e
working test
elliotBraem Jan 17, 2024
74b46e2
format
elliotBraem Jan 17, 2024
0262e77
posts legacy
elliotBraem Jan 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions .github/workflows/deploy-dev-testnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,24 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up node
uses: actions/setup-node@v3
- name: Set replacements
id: set_replacements
run: |
echo "replacements=$(jq -r '[to_entries[] | .["find"] = "${" + .key + "}" | .["replace"] = .value | del(.key, .value)]' replacements.dev.json | tr -d "\n\r")" >> $GITHUB_OUTPUT

- name: Replace placeholders
uses: flcdrg/replace-multiple-action@v1
with:
node-version: 20
cache: "npm"
- run: |
npm install
npm run build
files: '**/*.jsx'
find: '${{ steps.set_replacements.outputs.replacements }}'
prefix: '(^|.*)'
suffix: '($|.*)'

- name: Install bos CLI
run: |
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/FroVolod/bos-cli-rs/releases/download/v0.3.2/bos-cli-installer.sh | sh

- name: Deploy widgets
working-directory: ./build
run: |
which bos
echo $PATH
Expand Down
19 changes: 11 additions & 8 deletions .github/workflows/deploy-prod-mainnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,23 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up node
uses: actions/setup-node@v3
- name: Set replacements
id: set_replacements
run: |
echo "replacements=$(jq -r '[to_entries[] | .["find"] = "${" + .key + "}" | .["replace"] = .value | del(.key, .value)]' replacements.mainnet.json | tr -d "\n\r")" >> $GITHUB_OUTPUT

- name: Replace placeholders
uses: flcdrg/replace-multiple-action@v1
with:
node-version: 20
cache: "npm"
- run: |
npm install
npm run build
files: "**/*.jsx"
find: "${{ steps.set_replacements.outputs.replacements }}"
prefix: "(^|.*)"
suffix: "($|.*)"

- name: Install bos CLI
run: |
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/FroVolod/bos-cli-rs/releases/download/v0.3.6/bos-cli-installer.sh | sh

- name: Deploy widgets
working-directory: ./build
run: |
bos components deploy "$NEAR_SOCIAL_DEPLOY_ID" sign-as "$NEAR_SOCIAL_ACCOUNT_ID" network-config mainnet sign-with-plaintext-private-key --signer-public-key "$NEAR_SOCIAL_ACCOUNT_PUBLIC_KEY" --signer-private-key "$NEAR_SOCIAL_ACCOUNT_PRIVATE_KEY" send
54 changes: 11 additions & 43 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Contribution Guidelines for DevHub Repos

## Introduction

At DevHub, we value the contributions of each individual. This document provides an overview of the developer setup and deployment process to help you contribute to our project. We also recommend familiarizing yourself with [how we work](https://github.com/near/devgigsboard-widgets/blob/main/docs/how-we-work.md) to learn about our development process and enhance your contribution experience.

## Developer Setup
Expand Down Expand Up @@ -43,26 +42,12 @@ npm install

#### Run the dev script

To initiate the development environment, you can use the following script. This script will first check if bos-loader is installed and, if not, install it. Then, it will serve the default development environment and watch for changes inside `./src`.
To initiate the development environment, you can use the following script. This script will first check if bos-loader is installed and, if not, install it. Then, it will serve the default development environment.

```sh
npm run dev
```

This runs the bos-loader and the watcher together. You can also run testnet by running:

```sh
npm run dev:testnet
```

While testing the testnet, it's necessary to manually execute the watch script yourself to ensure that changes to files trigger the rebuilding process.

Open another terminal and run:

```sh
npm run watch
```

#### Customizing Creator ID, Contract ID, or Network

If you need to customize the account ID, override the contract ID, or specify a different network for your development environment, you can use the following flags:
Expand All @@ -73,26 +58,24 @@ If you need to customize the account ID, override the contract ID, or specify a

Here's how you can use these flags:

> [!IMPORTANT]
> You will have to change the replace script flags in package.json in order for the watch script to keep using the right flags.

```sh
npm run replace -a your_account_id -c your_contract_id -n your_network
npm run dev -a your_account_id -c your_contract_id -n your_network
```

For example:

```sh
npm run replace -a bob.near -c contract.bobs.near -n mainnet
npm run dev -a bob.near -c contract.bobs.near -n mainnet
```

By using these flags, you have the flexibility to customize the development environment according to your specific needs.


#### Developing across multiple environments

When referencing a component or any parameter that depends on the network, please use the placeholders defined in replacements.\*.json. There are three such files that correspond to different environments:
When referencing a component or any parameter that depends on the network, please use the placeholders defined in replacements.*.json. There are three such files that correspond to different environments:

`replacements.dev.json` - deploys the develop branch, to testnet @ test.beta.near.org
`replacements.dev.json` - deploys the develop branch, to testnet @ test.beta.near.org

`replacements.testnet.json` - deploys main branch, to testnet @ test.near.org

Expand All @@ -116,39 +99,25 @@ Currently, there is no local development environment, so we use [testnet NEAR So

Before deploying the widgets you need to make the needed replacements with references to the account that will host the widgets:

Edit the line in package.json that looks like this:

```json
"replace": "node ./scripts/replace.js -a devhub.near -c devgovgigs.near -n mainnet",
```

to something like this:

```json
"replace": "node ./scripts/replace.js -a devgovgigs.petersalomonsen.near -c devgovgigs.near -n mainnet",
```

Run:

```sh
npm run build
npm run build:preview -- -a devgovgigs.petersalomonsen.near -c devgovgigs.near
```

Then make sure you stay in the `build` directory when deploying

```sh
```
cd build
```

To deploy the widgets, we use [`bos` CLI](https://github.com/FroVolod/bos-cli-rs). Start with this command and follow the interactive questionnaire:

```sh
```
bos components deploy
```

After successful deployment, you will see a full command that could be used to re-deploy the widgets without interactive questionnaire, like this:

```sh
```
bos components deploy gigs.frol14.testnet sign-as gigs.frol14.testnet network-config testnet sign-with-macos-keychain send
```

Expand All @@ -168,7 +137,6 @@ There is GitHub Actions automation that deploys all the widgets to [`devgovgigs.
Thus, once a PR is merged, you should see the new version of the widgets on [DevHub](https://neardevhub.org) in less than 15 seconds.

### Before Publishing

Before publishing, make sure that you’ve go through this section.

#### Code Style and Formatting
Expand Down Expand Up @@ -205,4 +173,4 @@ Sometimes there is a need to deposit extra tokens to cover the widgets’ storag
bos social-db prepaid-storage deposit
```

NOTE: `bos` CLI will interactively ask all the rest of the details to prepare the transaction.
NOTE: `bos` CLI will interactively ask all the rest of the details to prepare the transaction.
21 changes: 0 additions & 21 deletions global.d.ts

This file was deleted.

Loading