From 46b60c6d69f327692104ce3e91cd6c57355c8753 Mon Sep 17 00:00:00 2001 From: Andrew Reifman-Packett Date: Fri, 26 Apr 2024 08:02:09 -0400 Subject: [PATCH] Making some changes for Plugin Approval (#11) * create 1 file and delete 1 file * update main.ts * update CHANGELOG.md, manifest.json and styles.css --- .github/workflows/changelog_enforce.yml | 11 +++++++ .github/workflows/update_changlog.yml | 41 ------------------------- CHANGELOG.md | 3 ++ main.ts | 5 --- manifest.json | 2 +- styles.css | 5 +-- 6 files changed, 16 insertions(+), 51 deletions(-) create mode 100644 .github/workflows/changelog_enforce.yml delete mode 100644 .github/workflows/update_changlog.yml diff --git a/.github/workflows/changelog_enforce.yml b/.github/workflows/changelog_enforce.yml new file mode 100644 index 0000000..093fa2d --- /dev/null +++ b/.github/workflows/changelog_enforce.yml @@ -0,0 +1,11 @@ +name: "Pull Request Workflow" +on: + pull_request: + types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled] + +jobs: + # Enforces the update of a changelog file on every pull request + changelog: + runs-on: ubuntu-latest + steps: + - uses: dangoslen/changelog-enforcer@v3 \ No newline at end of file diff --git a/.github/workflows/update_changlog.yml b/.github/workflows/update_changlog.yml deleted file mode 100644 index 948f3fe..0000000 --- a/.github/workflows/update_changlog.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Update changelog - -on: - push: - paths: - - 'manifest.json' - -jobs: - update-changelog: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Check for changes in manifest.json - id: check_manifest_changes - run: | - if git diff --quiet HEAD^ manifest.json; then - echo "::set-output name=changes::false" - else - echo "::set-output name=changes::true" - fi - - - name: Generate Changelog Entry - if: steps.check_manifest_changes.outputs.changes == 'true' - run: | - # Your script or command to generate changelog entry based on manifest.json changes - - - name: Append to Changelog - if: steps.check_manifest_changes.outputs.changes == 'true' - run: | - # Your script or command to append the generated changelog entry to CHANGELOG.md - - - name: Commit Changelog Update - if: steps.check_manifest_changes.outputs.changes == 'true' - run: | - git config --global user.name "GitHub Actions" - git config --global user.email "actions@users.noreply.github.com" - git add CHANGELOG.md - git commit -m "Update changelog for manifest.json changes" || true - git push origin HEAD:main \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d76638..46d7825 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### 1.0.5 Apr 26, 2024 + - Removed heading from Plugin settings page + - Removed unnecessary CSS code ### 1.0.4 - Abstracting css out to styles.css ### 1.0.3 diff --git a/main.ts b/main.ts index 57a13ff..e18e2cf 100644 --- a/main.ts +++ b/main.ts @@ -9,7 +9,6 @@ export default class LinkMagicPlugin extends Plugin { settings: PluginSettings; async onload() { - console.log('Loading plugin') await this.loadSettings(); this.addSettingTab(new SettingTab(this.app, this)); @@ -111,13 +110,11 @@ class SettingTab extends PluginSettingTab { const { containerEl } = this; containerEl.empty(); - containerEl.createEl("h2", { text: "LinkMagic Settings", cls: "default__margin" }); let settingName = "" new Setting(containerEl) .setName('Add a new rule') .addText((text) => { - text.inputEl.classList.add("default__margin") text.setPlaceholder("Rule Name").onChange((value) => { settingName = value; }); @@ -142,7 +139,6 @@ class SettingTab extends PluginSettingTab { new Setting(containerEl) .setName(key) .addText((text) => { - text.inputEl.classList.add("default__margin") text .setPlaceholder("Pattern") .setValue(this.plugin.settings[key].pattern) @@ -152,7 +148,6 @@ class SettingTab extends PluginSettingTab { }); }) .addText((text) => { - text.inputEl.classList.add("default__margin") text .setPlaceholder("Link") .setValue(this.plugin.settings[key].link) diff --git a/manifest.json b/manifest.json index 3e9a1ab..d215cb3 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "link-magic", "name": "LinkMagic", - "version": "1.0.4", + "version": "1.0.5", "minAppVersion": "0.15.0", "description": "Automatically adds links to defined regex.", "author": "Andrew Reifman", diff --git a/styles.css b/styles.css index 755b4d6..7bed3db 100644 --- a/styles.css +++ b/styles.css @@ -5,7 +5,4 @@ available in the app when your plugin is enabled. If your plugin does not need CSS, delete this file. -*/ -.default__margin { - margin-right: 6px; -} \ No newline at end of file +*/ \ No newline at end of file