forked from simple-icons/simple-icons
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
559 changed files
with
6,444 additions
and
2,295 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,4 @@ npm-debug.log | |
/index.js | ||
/index.mjs | ||
/index.d.ts | ||
/sdk.js |
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,20 @@ | ||
name: Get issue/pull request labels | ||
description: Get the current labels of an issue or pull request through the GitHub API | ||
|
||
inputs: | ||
issue_number: | ||
description: Issue or pull request number to get labels from | ||
required: true | ||
outputs: | ||
labels: | ||
description: Labels of the issue or pull request | ||
value: ${{ steps.get-labels.outputs.labels }} | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- id: get-labels | ||
shell: sh | ||
run: | | ||
labels="$(gh api 'repos/simple-icons/simple-icons/issues/${{ inputs.issue_number }}' --jq '.labels.[].name' | tr '\n' ',')" | ||
echo "labels=$labels" >> $GITHUB_OUTPUT |
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,16 @@ | ||
name: Get version | ||
description: Get the current version of the project | ||
|
||
outputs: | ||
version: | ||
description: The version of the project | ||
value: ${{ steps.get-version.outputs.version }} | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- id: get-version | ||
shell: sh | ||
run: | | ||
version="$(grep version -m 1 -i package.json | sed 's/[ \",:version]//g')" | ||
echo "version=$version" >> $GITHUB_OUTPUT |
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,7 @@ | ||
{ | ||
"ignorePatterns": [ | ||
{ | ||
"pattern": "^https://www.similarweb.com" | ||
} | ||
] | ||
} |
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 |
---|---|---|
|
@@ -20,17 +20,21 @@ jobs: | |
env: | ||
MY_GITHUB_TOKEN: ${{ secrets.AUTO_ASSIGN_WORKFLOW_TOKEN }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- id: get-labels | ||
name: Get labels | ||
run: | | ||
labels="$(curl --retry 5 -s https://api.github.com/repos/simple-icons/simple-icons/pulls/${{ github.event.pull_request.number }} | jq '.labels[].name' | tr '\n' ',' | sed -e 's/"//g' -e 's/,$//')" | ||
echo "::set-output name=labels::$labels" | ||
uses: ./.github/actions/get-labels | ||
with: | ||
issue_number: ${{ github.event.pull_request.number }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- id: get-si-members | ||
name: Get simple-icons members | ||
run: | | ||
members="$(curl --retry 5 -s https://api.github.com/orgs/simple-icons/members | jq .[].login | tr '\n' ',' | sed -e 's/"//g' -e 's/,$//')" | ||
echo "::set-output name=members::$members" | ||
members="$(curl -H 'Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' --retry 5 -s https://api.github.com/orgs/simple-icons/members | jq .[].login | tr '\n' ',' | sed -e 's/"//g' -e 's/,$//')" | ||
echo "members=$members" >> $GITHUB_OUTPUT | ||
- id: get-linked-issues | ||
name: Get linked issue numbers | ||
|
@@ -65,16 +69,44 @@ jobs: | |
if: | | ||
contains(steps.get-labels.outputs.labels, 'new icon') && | ||
join(steps.get-linked-issues.outputs.issues) != '' && | ||
contains(steps.get-si-members.outputs.members, github.event.actor.login) == false | ||
contains(steps.get-si-members.outputs.members, github.event.pull_request.user.login) == false | ||
with: | ||
project: https://github.com/orgs/simple-icons/projects/2 | ||
column_name: Priority 2 | ||
|
||
- id: priority-3 | ||
name: Assign `new icon` pull requests by maintainers to "Priority 3" | ||
uses: srggrs/[email protected] | ||
# the PR has the `new icon` label along with a linked issue and | ||
# the opener is a member of the simple-icons organisation | ||
if: | | ||
contains(steps.get-labels.outputs.labels, 'new icon') && | ||
join(steps.get-linked-issues.outputs.issues) != '' && | ||
contains(steps.get-si-members.outputs.members, github.event.pull_request.user.login) == true | ||
with: | ||
project: https://github.com/orgs/simple-icons/projects/2 | ||
column_name: Priority 3 | ||
|
||
- id: priority-4 | ||
name: Assign `new icon` pull requests by maintainers without an issue to "Priority 4" | ||
uses: srggrs/[email protected] | ||
# the PR has the `new icon` label but with no linked issue and | ||
# the opener is a member of the simple-icons organisation | ||
if: | | ||
contains(steps.get-labels.outputs.labels, 'new icon') && | ||
join(steps.get-linked-issues.outputs.issues) == '' && | ||
contains(steps.get-si-members.outputs.members, github.event.pull_request.user.login) == true | ||
with: | ||
project: https://github.com/orgs/simple-icons/projects/2 | ||
column_name: Priority 4 | ||
|
||
- name: Assign pull requests to "Unprioritised" | ||
uses: srggrs/[email protected] | ||
if: | | ||
steps.priority-1.conclusion == 'skipped' && | ||
steps.priority-2.conclusion == 'skipped' | ||
steps.priority-2.conclusion == 'skipped' && | ||
steps.priority-3.conclusion == 'skipped' && | ||
steps.priority-4.conclusion == 'skipped' | ||
with: | ||
project: https://github.com/orgs/simple-icons/projects/2 | ||
column_name: Unprioritised | ||
|
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,59 @@ | ||
name: Autocloser | ||
on: | ||
issues: | ||
# we allow 'reopend' and 'edited' in case the issue was closed by accident | ||
types: [opened] | ||
|
||
jobs: | ||
run: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- id: match-title | ||
name: Match title | ||
# if the title contains the word Java (case insensitive) | ||
# we make sure that this word is the end of the string or is followed by a space character (ex. we do not want to match javascript) | ||
# we make sure that this word is the beginning of the string or is preceded by a space character (ex. we do not want to match foojava) | ||
run: | | ||
if [[ "${{ github.event.issue.title }}" =~ (^|[[:space:]])([jJ][aA][vV][aA])([[:space:]]|$) ]]; then | ||
echo "match=true" >> $GITHUB_OUTPUT | ||
fi | ||
- id: get-labels | ||
uses: ./.github/actions/get-labels | ||
with: | ||
issue_number: ${{ github.event.issue.number }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# if the issue is labeled as a 'new icon' and it matches Java, we | ||
# - add a comment referring to the removal request | ||
# - we add the 'duplicate' label | ||
# - we close the issue | ||
- name: Close the issue | ||
if: | | ||
steps.match-title.outputs.match == 'true' && | ||
contains(steps.get-labels.outputs.labels, 'new icon') | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
github.rest.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: 'This issue was automatically closed. Please refer to #7374.' | ||
}) | ||
github.rest.issues.addLabels({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
labels: ['duplicate'] | ||
}) | ||
github.rest.issues.update({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
state: 'closed', | ||
state_reason: 'not_planned' | ||
}); |
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
Oops, something went wrong.