File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010 push :
1111
1212jobs :
13+ check-permission :
14+ runs-on : ubuntu-latest
15+ outputs :
16+ authorised : ${{ steps.check-permission.outputs.authorised }}
17+ steps :
18+ - name : Determine if user has permission to update the database
19+ id : check-permission
20+ run : |
21+ USER=${{ github.event.sender.login }}
22+ REPO=${{ github.repository }}
23+ RESPONSE=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
24+ "https://api.github.com/repos/$REPO/collaborators/$USER/permission")
25+ PERMISSION=$(echo "$RESPONSE" | sed -n 's/.*"permission": "\(.*\)".*/\1/p')
26+ if [ "$PERMISSION" = "admin" ] || [ "$PERMISSION" = "maintain" ] || [ "$PERMISSION" = "write" ]; then
27+ AUTHORISED="true"
28+ else
29+ AUTHORISED="false"
30+ fi
31+ echo "authorised=$AUTHORISED" >> $GITHUB_OUTPUT
32+
1333 update-database :
34+ needs : check-permission
1435 # If the workflow was triggered by closing an issue, only run if the issue contains the 'add-plugin' label.
15- if : ${{ github.event_name == 'workflow_dispatch' }} or ${{ github.event.label.name == 'add-plugin' }}
36+ if : |
37+ needs.check-permission.outputs.authorised == 'true' &&
38+ (github.event_name == 'workflow_dispatch' || github.event.label.name == 'add-plugin')
1639 runs-on : ubuntu-latest
1740 steps :
1841 - name : Checkout repo content
2346 - name : Retrieve URL submission
2447 id : url
2548 run : |
26- if ${{ github.event_name == ' issues' }} ; then
49+ if [ " ${{ github.event_name }}" == " issues" ] ; then
2750 echo "url=${{ github.event.issue.body }}" >> $GITHUB_OUTPUT
2851 else
2952 echo "url=''" >> $GITHUB_OUTPUT
Original file line number Diff line number Diff line change 1+ # Byte-compiled / optimized / DLL files
2+ __pycache__ /
3+ * .py [cod ]
4+
5+ # Distribution / packaging
6+ wheels /
7+ build /
8+ dist /
9+ * .egg-info /
10+ * .egg
11+ .eggs /
12+
13+ # Intellij projects
14+ .idea /
Original file line number Diff line number Diff line change @@ -17,3 +17,5 @@ MAP-Client users are able to submit their own MAP plugins to the MAP Plugin Data
1717to submit an issue in the `MAP Plugin Database `_ GitHub repository. The issue should be tagged with the *add-plugin * label. The body of the
1818issue submission should contain only the GitHub repository path of the plugin to be added; this path should be in the format:
1919*{organization}/{repository} *, for example: *mapclient-plugins/pointsourcestep *.
20+
21+ Editing database entries and triggering the automated processes to update this database are restricted to repository maintainers.
You can’t perform that action at this time.
0 commit comments