-
Notifications
You must be signed in to change notification settings - Fork 4
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 #30 from ttsukagoshi/main
v1.0.1 release
- Loading branch information
Showing
12 changed files
with
773 additions
and
120 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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: "[BUG] " | ||
labels: bug | ||
assignees: ttsukagoshi | ||
|
||
--- | ||
|
||
**Describe the bug** | ||
A clear and concise description of what the bug is. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Screenshots** | ||
If applicable, add screenshots to help explain your problem. | ||
|
||
**Additional context** | ||
Add any other context about the problem here. |
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,20 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: "[NEW FEAT] " | ||
labels: enhancement | ||
assignees: ttsukagoshi | ||
|
||
--- | ||
|
||
**Is your feature request related to a problem? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions or features you've considered. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. |
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,67 @@ | ||
# For most projects, this workflow file will not need changing; you simply need | ||
# to commit it to your repository. | ||
# | ||
# You may wish to alter this file to override the set of languages analyzed, | ||
# or to provide custom queries or build logic. | ||
# | ||
# ******** NOTE ******** | ||
# We have attempted to detect the languages in your repository. Please check | ||
# the `language` matrix defined below to confirm you have the correct set of | ||
# supported CodeQL languages. | ||
# | ||
name: 'CodeQL' | ||
|
||
on: | ||
push: | ||
branches: [main, release] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [main] | ||
# schedule: | ||
# - cron: '30 08 * * 5' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: ['javascript'] | ||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] | ||
# Learn more: | ||
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: ${{ matrix.language }} | ||
# If you wish to specify custom queries, you can do so here or in a config file. | ||
# By default, queries listed here will override any specified in a config file. | ||
# Prefix the list here with "+" to use these queries and those in the config file. | ||
# queries: ./path/to/local/query, your-org/your-repo/queries@main | ||
|
||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). | ||
# If this step fails, then you should remove it and run the build manually (see below) | ||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v2 | ||
|
||
# ℹ️ Command-line programs to run using the OS shell. | ||
# 📚 https://git.io/JvXDl | ||
|
||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines | ||
# and modify them (or add more) to build your code if your project | ||
# uses a compiled language | ||
|
||
#- run: | | ||
# make bootstrap | ||
# make release | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 |
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 |
---|---|---|
@@ -1,3 +1,6 @@ | ||
# System files | ||
.DS_Store | ||
|
||
# node | ||
node_modules/ | ||
|
||
|
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 |
---|---|---|
@@ -1,2 +1,28 @@ | ||
# Unshare - Share no more the files you own | ||
# Unshare | ||
|
||
[![Google Workspaceマーケットプレイスでこのアドオンを入手する](https://img.shields.io/badge/Google%20Workspace%20Add--on-Available-green?style=flat-square)](https://workspace.google.com/marketplace/app/unshare/493847743062) [![clasp](https://img.shields.io/badge/built%20with-clasp-4285f4.svg?style=flat-square)](https://github.com/google/clasp) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier) | ||
[![Lint Code Base](https://github.com/ttsukagoshi/unshare/actions/workflows/linter.yml/badge.svg)](https://github.com/ttsukagoshi/unshare/actions/workflows/linter.yml) [![CodeQL](https://github.com/ttsukagoshi/unshare/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/ttsukagoshi/unshare/actions/workflows/codeql-analysis.yml) [![Deploy](https://github.com/ttsukagoshi/unshare/actions/workflows/deploy.yml/badge.svg)](https://github.com/ttsukagoshi/unshare/actions/workflows/deploy.yml) | ||
|
||
Open-sourced Google Workspace Add-on to "un"share Google Drive files that you own with a tap. | ||
|
||
## Overview | ||
|
||
![Unshare icon](https://lh3.googleusercontent.com/pw/AM-JKLUeE_Ws9D1PaPh9_8CVmjpbscs1hQc8viJ_eBoZQ6OdolI3GyNrfAoWAy3w7hhvM2NSWY1EdFLsvCu2j5U7gtExx7Ou5uEctsImUiIvzDlKFRJl0LwRVqBMD7j2FHAiIsfS0-Vy7aFn5kaDh4MSvXZ4=s96-no) | ||
|
||
Unshare is a Google Workspace Add-on to bulk remove all editors, commenters, and viewers from the selected Google Drive file/folder except for you, the owner. If the target file/folder is shared with a class of users who have general access, for example, if it is shared with the user's domain, that access setting will be changed to Private, where only the users explicitly granted permission can access. | ||
|
||
## How to use | ||
|
||
### 1. Install the add-on | ||
|
||
Install this add-on from [the Google Workspace Marketplace](https://workspace.google.com/marketplace/app/unshare/493847743062). You have only to do this once per user; updates to the add-on will be automatically distributed via the Marketplace. | ||
|
||
### 2. Select target file/folder(s) | ||
|
||
Select the files and folders that you want to "un"share. Click on the add-on's icon on the right side and follow the instructions. That's it! | ||
|
||
> You can also use this add-on by opening independent files on Google Docs, Sheets, and Slides. | ||
## Terms and Conditions | ||
|
||
You must agree to the [Terms and Conditions](https://www.scriptable-assets.page/add-ons/unshare/#terms-and-conditions) to use this add-on. |
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,128 @@ | ||
# Contributor Covenant Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
We as members, contributors, and leaders pledge to make participation in our | ||
community a harassment-free experience for everyone, regardless of age, body | ||
size, visible or invisible disability, ethnicity, sex characteristics, gender | ||
identity and expression, level of experience, education, socio-economic status, | ||
nationality, personal appearance, race, religion, or sexual identity | ||
and orientation. | ||
|
||
We pledge to act and interact in ways that contribute to an open, welcoming, | ||
diverse, inclusive, and healthy community. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to a positive environment for our | ||
community include: | ||
|
||
- Demonstrating empathy and kindness toward other people | ||
- Being respectful of differing opinions, viewpoints, and experiences | ||
- Giving and gracefully accepting constructive feedback | ||
- Accepting responsibility and apologizing to those affected by our mistakes, | ||
and learning from the experience | ||
- Focusing on what is best not just for us as individuals, but for the | ||
overall community | ||
|
||
Examples of unacceptable behavior include: | ||
|
||
- The use of sexualized language or imagery, and sexual attention or | ||
advances of any kind | ||
- Trolling, insulting or derogatory comments, and personal or political attacks | ||
- Public or private harassment | ||
- Publishing others' private information, such as a physical or email | ||
address, without their explicit permission | ||
- Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
|
||
## Enforcement Responsibilities | ||
|
||
Community leaders are responsible for clarifying and enforcing our standards of | ||
acceptable behavior and will take appropriate and fair corrective action in | ||
response to any behavior that they deem inappropriate, threatening, offensive, | ||
or harmful. | ||
|
||
Community leaders have the right and responsibility to remove, edit, or reject | ||
comments, commits, code, wiki edits, issues, and other contributions that are | ||
not aligned to this Code of Conduct, and will communicate reasons for moderation | ||
decisions when appropriate. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies within all community spaces, and also applies when | ||
an individual is officially representing the community in public spaces. | ||
Examples of representing our community include using an official e-mail address, | ||
posting via an official social media account, or acting as an appointed | ||
representative at an online or offline event. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
reported to the community leaders responsible for enforcement at | ||
https://www.scriptable-assets.page/terms-and-conditions/#contact. | ||
All complaints will be reviewed and investigated promptly and fairly. | ||
|
||
All community leaders are obligated to respect the privacy and security of the | ||
reporter of any incident. | ||
|
||
## Enforcement Guidelines | ||
|
||
Community leaders will follow these Community Impact Guidelines in determining | ||
the consequences for any action they deem in violation of this Code of Conduct: | ||
|
||
### 1. Correction | ||
|
||
**Community Impact**: Use of inappropriate language or other behavior deemed | ||
unprofessional or unwelcome in the community. | ||
|
||
**Consequence**: A private, written warning from community leaders, providing | ||
clarity around the nature of the violation and an explanation of why the | ||
behavior was inappropriate. A public apology may be requested. | ||
|
||
### 2. Warning | ||
|
||
**Community Impact**: A violation through a single incident or series | ||
of actions. | ||
|
||
**Consequence**: A warning with consequences for continued behavior. No | ||
interaction with the people involved, including unsolicited interaction with | ||
those enforcing the Code of Conduct, for a specified period of time. This | ||
includes avoiding interactions in community spaces as well as external channels | ||
like social media. Violating these terms may lead to a temporary or | ||
permanent ban. | ||
|
||
### 3. Temporary Ban | ||
|
||
**Community Impact**: A serious violation of community standards, including | ||
sustained inappropriate behavior. | ||
|
||
**Consequence**: A temporary ban from any sort of interaction or public | ||
communication with the community for a specified period of time. No public or | ||
private interaction with the people involved, including unsolicited interaction | ||
with those enforcing the Code of Conduct, is allowed during this period. | ||
Violating these terms may lead to a permanent ban. | ||
|
||
### 4. Permanent Ban | ||
|
||
**Community Impact**: Demonstrating a pattern of violation of community | ||
standards, including sustained inappropriate behavior, harassment of an | ||
individual, or aggression toward or disparagement of classes of individuals. | ||
|
||
**Consequence**: A permanent ban from any sort of public interaction within | ||
the community. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], | ||
version 2.0, available at | ||
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. | ||
|
||
Community Impact Guidelines were inspired by [Mozilla's code of conduct | ||
enforcement ladder](https://github.com/mozilla/diversity). | ||
|
||
[homepage]: https://www.contributor-covenant.org | ||
|
||
For answers to common questions about this code of conduct, see the FAQ at | ||
https://www.contributor-covenant.org/faq. Translations are available at | ||
https://www.contributor-covenant.org/translations. |
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,64 @@ | ||
# Contributing Guideline for Unshare | ||
|
||
## 🎉 Welcome! | ||
|
||
First of all, thank you for taking interest in Unshare! We would love to have you onboard this open-sourced project. This guideline serves as the documentation for anyone who has the spirit of making Unshare a better add-on. | ||
|
||
## 💬 Concept of Unshare | ||
|
||
Unshare is designed to be a simple tool to remove collaborators from the Google Drive files/folders that the user owns. As such, features that require extensive documentation will be considered excessive and will not be the target of additional development or pull request reviews. | ||
|
||
## 📝 Contributing | ||
|
||
Contributing isn't just about writing codes. It could be from reporting a bug to coding a new feature on your own, or simply making suggestions for improving the add-on. Just make sure you adhere to our [Code of Conduct](https://github.com/ttsukagoshi/unshare/blob/main/docs/CODE_OF_CONDUCT.md). | ||
|
||
### Open an Issue | ||
|
||
To report a bug or request a new feature, [create a new issue](https://github.com/ttsukagoshi/unshare/issues/new/choose). If you have a question you want answered, please consider posting them on the [Discussions](https://github.com/ttsukagoshi/unshare/discussions) page instead, where we have the [Q & A](https://github.com/ttsukagoshi/unshare/discussions/categories/q-a) category specifically for that purpose. | ||
|
||
Please take a look at the existing open issues & discussions before actually posting them to avoid duplications. | ||
|
||
### Code on your own. Make pull-requests. | ||
|
||
Take a look at [firstcontributions/first-contributions: 🚀✨ Help beginners to contribute to open source projects](https://github.com/firstcontributions/first-contributions) for the basics of contributing code to this project. We recommend creating an issue beforehand and referencing it in your pull request to keep the review process simple. | ||
|
||
#### Coding Style | ||
|
||
- Install [Node.js](https://nodejs.org/) | ||
- We use [clasp](https://github.com/google/clasp), [ESLint](https://eslint.org/), and [Prettier](https://prettier.io/) to code Unshare. Once you've forked and cloned this repository, execute `npm ci` at the cloned directory. | ||
- [Visual Studio Code](https://code.visualstudio.com/) is the preferred editor. | ||
|
||
#### \[Help Needed\] Internationalization/Localization | ||
|
||
Want to contribute, but not sure where to start with? Localization could be a great starter! Unshare currently supports the following languages: | ||
|
||
- English (US) | ||
- Japanese | ||
|
||
Adding other languages to this list is always welcome. Please follow the steps below to make Unshare more inclusive: | ||
|
||
1. [Create a new issue](https://github.com/ttsukagoshi/unshare/issues/new?assignees=ttsukagoshi&labels=enhancement&template=feature_request.md&title=%5BNEW+FEAT%5D) to specify the language you will be adding, and to let everyone in the community know that you will be working on it. The issue title should be something like `[NEW FEAT] Add Spanish language`. If there is an existing issue for the language of your choice, avoid creating a duplicate issue and see if you can collaborate with the user who created the original issue. | ||
2. Fork the repository and start working on the translation. All UI messages are defined in `../src/unshare.js` under the const `MESSAGES`: | ||
|
||
```javascript | ||
const MESSAGES = { | ||
en: { | ||
'<messageName>': '<messageString>', | ||
}, | ||
ja: {...} | ||
}; | ||
``` | ||
|
||
The keys directly under MESSAGES correspond with the user locale value in the Google Workspace Add-on event object. | ||
|
||
> `event.commonEventObject.userLocale`: The user's language and country/region identifier in the format of [ISO 639](https://en.wikipedia.org/wiki/ISO_639_macrolanguage) language code-[ISO 3166](https://en.wikipedia.org/wiki/ISO_3166) country/region code. For example, `en-US`. | ||
> | ||
> Source: https://developers.google.com/apps-script/add-ons/concepts/event-objects#common_event_object | ||
Contrary to the description in the official document, it seems `en-US` is expressed simply as `en`, whereas English (United Kingdom) is expressed `en-GB`. Moreover, as in the above example `ja`, it seems languages that do not have country/region variations are expressed simply by the two-letter, lowercase ISO 639 language code. Add the locale code of your choice, copy the values from `en`, and translate the messages. | ||
|
||
Note that some messages have placeholders like `{{myEmail}}`. Translate such messages so that the placeholders are kept in context. | ||
|
||
## 📗 References | ||
|
||
- [Code of Conduct](https://github.com/ttsukagoshi/unshare/blob/main/docs/CODE_OF_CONDUCT.md) |
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,5 @@ | ||
# Security Policy | ||
|
||
## Reporting a Vulnerability | ||
|
||
If you happen to come across a vulnerability that is unique to this add-on, please report them using the [contact specified in our Terms and Conditions](https://www.scriptable-assets.page/terms-and-conditions/#contact) |
Oops, something went wrong.