Swift Package Collections doesn't work with an Entreprise GitHub account - swift

I am trying to generate a package collections from a GitHub entreprise account, using the command line (follwing the steps on the official doc):
package-collection-generate packages.json collection.json
When I ran this command, the Terminal ask me for my user name, once provided it keeps runing without a result, until I stop it using Ctl-C
The packages.json looks like this:
{
"name": "Entreprise iOS packages",
"overview": "This collection contains the entreprise Swift packages.",
"author": {
"name": "Swift packages"
},
"keywords": [
"iOS"
],
"packages": [
{
"url": "https://github.entreprise.com/[ORGANISATION]/[REPO].git"
}
]
}
I have also ttried to integrate my access token and user name in the url like this:
https://[UserName]:[AccessToken]#https://github.entreprise.com/[ORGANISATION]/[REPO].git
I have also tried to use the SSH url, with no success.
git#github.entreprise.com:[ORGANISATION]/[REPO].git
I can import the same package using Xcode Packages
I have SSH configured on my machine
I have tried to use both Private and Public access to the repo
With the same setup, I can create a collection using a non-entreprise GitHub account.
Maybe I am missing something or Swift Package Collection doesn't work with a GitHub Entreprise account!
Can you please advice what to do here?

You talk about a Github enterprise account but give a completely wrong URL in multiple places in your question (including your packages.json). Double-check that.

Related

Automate Activity on Github to look good to potential employers

I want to automate daily activity on my github so that when a potential employer checks out my github they will see that I've been extremely active. Can anyone suggest the most simple way to do this that would look convicing?
One way you could achieve a daily automated GitHub update is to use the GitHub API to changes that are done automatically, either through a bash script, or some other way.
In a project, pick some files that will change all the time. That might be configuration file or just create a new file with something in it every day.
You can automate this part with a cron job. Make the cron job create/update a file every day at the same time.
Then using the GitHub v3 api, you can either create/update files and push them to your repo. Again, this can be part of your cron job.
By using this API, you'll get a commit from GitHub that should be reflected in your contributions chart on your profile.
If we see the response from GitHub, you should get something like this, which should count as a contribution.
{
"content": {
"name": "hello.txt",
"path": "notes/hello.txt",
"sha": "95b966ae1c166bd92f8ae7d1c313e738c731dfc3",
"size": 9,
"url": "https://api.github.com/repos/octocat/Hello-World/contents/notes/hello.txt",
.
.
.
},
"commit": {
"sha": "7638417db6d59f3c431d3e1f261cc637155684cd",
<more things>
"author": { <response here>
"committer": { <response here>
"message": "my commit message",
.
.
.
}

Heroku Review Apps not deploying at all

I'm trying to automatically create review apps as part of my pipeline and testing procedure when pull requests are created on the corresponding GitHub repository. When the PR is created, it appears as a review app, but doesn't actually get created.
In the DevTools console, a 404 error is there about the review-app-config. I'm not sure if this is directly related, as I've successfully created a review app on a different pipeline (with a different owner) with the same error.
This 404 error changes between the file not being available at all, or that it's returning an error. When it's the latter, the file contains the following:
{"id":"missing_version","error":"Please specify a version along with Heroku's API MIME type. For example, `Accept: application/vnd.heroku+json; version=3`.\n"}
I'm creating and managing all of the apps/pipelines with the GUI on dashboard.heroku.com. The version accept header appears to be needed for the Heroku API but I've no idea how to implement it. Any help would be greatly appreciated!
Firstly check that your app.json file is valid json. If it isn't then that will cause the deployment to fall over.
Secondly check if you have any scripts in the app.json key. If you have any here and they are incorrect then this will also cause it to hand and fall over with no warning displayed.
{
"name": "App name",
"scripts": {
"deploy": "command that won't work!!"
},
...
}
You many not need any scripts in here so it can also be empty!
{
"name": "App name",
"scripts": {},
...
}

Extending S/4HANA OData service to SCP

I want to extend a custom OData service created in a S/4HANA system. I added a Cloud Connector to my machine, but I don't know how to go from there. The idea is that I want people to access the service from SCP and that I don't need multiple accounts accessing the service on the S/4 system, but just the one coming from SCP. Any ideas?
Ok I feel silly doing this but it seems to work. My test is actually inconclusive because I don't have a cloud connector handy, but it works proxy-ing google.
I'm still thinking about how to make it publicly accessible. There might be people with better answers than this.
create the cloud connector destination.
make a new folder in webide
create file neo-app.json.
content:
{
"routes": [{
"path": "/google",
"target": {
"type": "destination",
"name": "google"
},
"description": "google"
}],
"sendWelcomeFileRedirect": false
}
path is the proxy in your app, so myapp.scp-account/google here. the target name is your destination. I called it just google, you'll put your cloud connector destination.
Deploy.
My test app with destination google going to https://www.google.com came out looking like this. Paths are relative so it doesn't work but google seems proxied.
You'll still have to authenticate etc.

Telescope / Meteor deployment using meteor UP on MongoDB url mup.json configuration

I am new developing Meteor apps and I just set up a Telescope blog which is based in Meteor.
I want to deploy it in my own hosting (a droplet at Digital ocean) using "Meteor Up" but I dont know how to configure the "MONGO_URL" and "MAIL_URL" in the mup.json file.
Everything was set up transparently in local so I have no clue where is the DB and who is the user or the password... Any help or orientation where I should look up?
Here a snippet of my mup.json file:
{
"env": {
"PORT": 80,
"ROOT_URL": "",
"MONGO_URL": "mongodb://:#:/App",
"MAIL_URL": "smtp://postmaster%40myapp.mailgun.org:adj87sjhd7s#smtp.mailgun.org:587/"
},
Remove the mongo_url and it will use an internal mongo server. (I am sure of this)
You will need to apply for a free account at mailgun and use your api key here.
(guessing here) To get started, try eliminating that key as well and you may be fine.
{ "env": { "PORT": 80, "ROOT_URL": "" },

How to upload user picture in moodle from other system using web service

I have Moodle & Drupal integrated system, Drupal is primary, user is created in drupal first then it will create in moodle via web services, but I am not able to carry user picture from drupal to moodle, I don't want core fixes, need clean and systematically solution for it.
Can anyone help me?
Unfortunately there isn't an appropriate web service in core which supports this at the moment. You can see web services documented in your Moodle install in Home ▶ Site administration ▶ Plugins ▶ Web services ▶ API Documentation.
There are many ways to support this with plugins, but since you do not seem keen to go down this route, have your considered using Gravatar as a solution? There are docs on how to set this up: http://docs.moodle.org/25/en/Roles_settings#Enable_Gravatar
the first step upload the picture
localhost/moodle/webservice/upload.phptoken=9f47591ed3f6cc53720f0dc4e81&filearea=draft
Params:-
token=9f47591ed3f6cc53720f0dc4e81
filearea=draft
then you will get a response like
[
{
"component": "user",
"contextid": 5,
"userid": "2",
"filearea": "draft",
"filename": "Ali Hasans Resume.pdf",
"filepath": "/",
"itemid": 560134043,
"license": "unknown",
"author": "Admin User",
"source": "O:8:\"stdClass\":1:{s:6:\"source\";s:21:\"Ali Hasans Resume.pdf\";}"
}
]
second step
update the profile picture
localhost/moodle/webservice/rest/server.php?moodlewsrestformat=json&draftitemid=560134043&wsfunction=core_user_update_picture&wstoken=9f47591ed3f6cc53720f0dc4e81
params
moodlewsrestformat=json
draftitemid=560134043 this "draftitemid" comes from upload.php response
wsfunction=core_user_update_picture
wstoken=9f47591ed3f6cc53720f0dc4e81
if it's a success then the response will like
{
"success": true,
"profileimageurl": "http://localhost/moodle/theme/image.php/alpha/core/1609845491/u/f1",
"warnings": []
}
here I get this idea https://tracker.moodle.org/browse/MDL-56070